Use flake8 for static analysis

This includes pep8 as we were doing before, but also adds a bunch
of other useful static analysis tests to ensure our code is clean.
Fix all static analysis findings except cyclomatic complexity ones
Fix cyclomatic complexity findings (fixes #300)
Don't ignore coverage on 500 error case (we do test some of those)
Fix variable name in CMakeLists
Merge pull request #302 from girder/flake8

Use flake8 for static analysis