StringIO: promoting content encoding when initialized with an empty string.

I've put the specs under `StringIO#initialize` since that's where the behaviour branches, although the actual changes are in `StringIO#write`. Let me know if it's ok.