qapi: adapt to moved location of StringIO module in py3