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
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.
Refactor so that CopyAndTranslateBuffer() calls on TranslateInputEOL()
instead of duplicating so much of its function.  Note the testing gaps.
merge 8.5
Coverage test for -translation auto handling of INPUT_SAW_CR flag.
Demonstrates refactor failure.
Refactor correction exposed by coverage test.
coverage test for -translation cr
Another coverage test that reveals refactoring error.
Callers of TranslateInputEOL are expected to manage the INPUT_NEED_NL flag.
Shortcut ReadBytes() when it's a no-op.
Next coverage test to expose another refactoring error.
Refactoring repair to fix failing test.
Can we send some binary reads down the char-reading path?
Switch consistently on the narrower def of binary mode.