Fix flake8 failures in gateway
Fix flake8 warnings in gateway
Fix typo and broken import
Add back import that is used in other modules only
Merge pull request #2252 from knabar/flake8-gateway-dev50

omero gateway flake8 cleanup: Fix failures and warnings (dev_5_0)