StringIO#getbyte should work in terms of bytes rather than characters

Fixes issue #2215.

StringIO#getbyte currently retrieves characters at a time, rather than bytes.
The current behavior differs from that observed in Ruby 1.8, 1.9, and 2.0, so
a fix is included for all versions.