Py3k-friendly use of StringIO. Remove unused imports.

This was done manually. Note that Python 2.7 has an io.StringIO class, but it's strictly Python3-compatible and deals in Unicode strings instead of bytes, so I preferred the classic cStringIO implementation for Python 2.

For the modules where StringIO was imported but not used, I just pruned them.
I suspect that when you get farther along with the Python 3 port, you'll end up using bytes instead of unicode/str for all the internal strings. I therefore predict you'll eventually change this to io.BytesIO. But we'll see what time brings :)