Fixed pyflakes issues.

Change-Id: Ifa63142b5587846e6c61c9337a9b85489e0f8b87
Fix hacking style violations.

As part of this, move utility libraries and tests into the
devstack_gate package. This gives them a bit of namespacing,
and allows us to avoid relative imports, which will make hacking
pleased.

Change-Id: I22475b38a02598d88f0441c217a773897823a832
Fix up the remaining pep8 things.

Change-Id: I95e98bd3526536c61726dd40294ae6254bdaf587
Remove locals()

Change-Id: If4864639e10b5a9a87ea6666b63d88eda84e6d77