bpo-29741: Clean up C implementations of BytesIO and StringIO. (#606)

Some BytesIO methods now accept not just int subclasses but other int-like types.
4 files changed