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.

For now this PR is being excluded as it will conflict with other `flake8` PRs and certainly with gh-3086.

/cc @sbesson @will-moore @joshmoore  
--no-rebase
--exclude