Issue #18427: str.replace could crash the interpreter with huge strings.

This fixes two places where 'int'  was used to represent
the size of strings, instead of 'Py_ssize_t'.

(The issue is not present in the corresponding code in the 3.x branches)

Fixes #18427
Issue #18336. Fix a link to StreamReader's read() method.
Merge heads
Fix reference leaks introduced by the patch for issue #5308.
Issue #18101: Tcl.split() now process Unicode strings nested in a tuple as it
do with byte strings.

Added tests for Tcl.split() and tcl.splitline().