Enable H307 PEP8 check

Fixes files with the PEP8 error:

    H307  like imports should be grouped together

and enables the check in tox.ini.

For the modified files, made sure the import order matches the
template as described in:

http://docs.openstack.org/developer/hacking/#import-order-template

This order is currently: stdlib, 3rd-party, and project imports.

Change-Id: I4538356c207535b778da1273aadcf3b4a7b20383