add flake8 checks to teuthology

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
(cherry picked from commit 27c9eb8f81dc25c7b50bfb77d4d2d4ab4d136fb6)
(cherry picked from commit b390d68ff4b7a648da3f22bd5ae34651d02fd915)
Add missing requirement: web.py
(cherry picked from commit 1b3349525c361d4253f76729f8416ac6d9029289)
Make teuthology.locker a module
Fix undefined name errors
(cherry picked from commit f59497ef2214f29d5995435d83766c7994e8f2cd)
Remove unused imports
(cherry picked from commit 586817481119c4fc4a39f8804e7871a43491e01f)
Remove unused variables
(cherry picked from commit 581b6b3e977b99fc58fe25e66c933c65e38dc87c)
Don't redefine variable
(cherry picked from commit 083717c1b4022289806030faf23ff7c4aa371f19)
Add '# noqa' to suppress a linter error

Fixing this would require some more significant changes... and tempt me
with rewriting every module in the directory.
(cherry picked from commit 3fc39a59fd415a4e4e6f2a0354fe900477167e51)
Move 'import os' to inside main()

This is necessary because of the monkey-patching.
Merge pull request #114 from ceph/wip-linter

Fix lots of linter errors