Mark undefined variables in settings.py with #noqa
Fix missing and overriding variables
Fix missing and duplicate imports
Remove redefined unused imports
Merge pull request #2222 from knabar/flake8-cleanup-dev50

OmeroWeb flake8 cleanup of most severe warnings (dev_5_0)