Add ensure_open_and_* methods to StringIO.

These methods are required to allow IO.copy_stream to work against a StringIO
instance.

Alternatively, it may be better to refactor IO.copy_stream to not use these
methods, as they aren't API-compatible with the MRI IO implementation?