Improve io.StringIO() performance

Closed Ronan Lamy requested to merge branch/StringIO-perf into branch/default

Fix a performance regression that made io.StringIO much slower than on CPython, and add optimisations to avoid expensive conversions to UTF32 as much as possible.

Merge request reports