Add tox, pep8, pyflakes, testr support

Also fix the python to comply. This has to be done as a single
change otherwise we'll never bootstrap gating.

Change-Id: I4a21d57e0341802a1652428dee16c60abb30251d