py3: Various import cleanups

Mostly fixing cStringIO imports on py3.