Flake8 the omero gateway

This PR `flake8`s the gateway. The rather large and byzantine `__init__.py` file has been committed fix-by-fix. The commits containing `pep8` error numbers have been done automatically, the remaining commits manually. The later commits are more likely to affect logic, the earlier ones are mainly whitespace chnages. I have avoided any significant refactoring though there is the odd commit that creates a local variable to make `flake8`ing easier. The gateway integration tests all pass locally.

It needs no direct testing but the odd eye cast over it would be very welcome. The integration tests on Jenkins should be green other than any usual intermittent suspects.

/cc @sbesson @will-moore @joshmoore  
--no-rebase