[Gate fix] Fix py35 gate due to incompatible import

The py35 gate is failing due to the same issue
for a few tests [0]: when creating an image with
random bytes, six.moves.cStringIO is used, when
the compatible way is instead six.StringIO.

This commit also makes ``test_create_server_forced_host``
compatible with python3. Currently, the following error is thrown:

TypeError: 'dict_keys' object does not support indexing

This commit wraps keys() with list() before indexing to fix
the error.

[0] http://logs.openstack.org/51/462251/19/check/gate-tempest-dsvm-patrole-py35-member-ubuntu-xenial-nv/cdb7cdb/console.html

Change-Id: I8728c2e68f99807b70bd566fd8e0b6b9caf871af
Closes-Bug: #1689960
3 files changed