Fix precedence of StringIO imports for LogTrapTestCase.

io.StringIO doesn't allow byte strings even on python 2, which causes
it to fail with the standard log formatter (but not tornado's "pretty
logging").

Closes #708.