Follow hacking rules about import

This patch follows the rules about import in HACKING.rst
https://github.com/openstack/marconi/blob/master/HACKING.rst#imports

* reorder imports
* Add missing blank lines before code

Change-Id: I4abcfb3a2640499c5df34cbf75b5eaecb3d19823
Merge "Follow hacking rules about import"