To prepare for completion of the [socket -async] implementation:
  *  Move the server code from CreateSocket to Tcl_OpenTcpServer.
  *  Rename CreateSocket to CreateClientSocket.
  *  Unify the naming convention of socket channels with Unix (sock + hex representation of the state/info structure).
merge trunk
Backport of bytearray append machinery to support bug fixes in ReadBytes.
There is no need for ReadBytes() or its caller(s) to track how many bytes
are actually stored in objPtr.  The ByteArray Tcl_ObjType already has the
machinery to take care of this.
merge 8.5
Revise the Tcl_Append* machinery to tolerate NULL bytes to append.
Then have ReadChars() use that machinery to resize buffer receiving input,
rather than invent its own version.  Simplify ReadChars() callers.
merge 8.5
win/tclWinChan.c Tcl_InitNotifier: Bug [2413550] Avoid reopening of serial channels which causes issues with Bluetooth virtual com. Patch by Rolf Schroedter.
merge 8.5
merge 8.5
Revised ReadChars to restore an attempt to make sure we do not short read
because of a false notion of limited storage space.
The test suite does not appear to demonstrate any case where this matters.
Could be an incomplete test suite, or an example of pointless code.
This patch is not pointless.  Tests encoding-25.* demonstrate its utility.
Eliminate all usage of WIN32 and __WIN32__ macros: Some compilers (e.g. Clang/LLVM) don't define it, and _WIN32 is much more portable anyway. 
See: [http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#WindowsCygwinnonPOSIXandMinGW]
Changed position of flag evaluation as proposed by Phil Hoffman
Fix execute permission bit (should not be set) for *Decls.h files
Refactor so that CopyAndTranslateBuffer() calls on TranslateInputEOL()
instead of duplicating so much of its function.  Note the testing gaps.
typo
typo
merge 8.5
[9bf7e67b37]: minor documentation blooper