[WIP] Use flake8 for static analysis

I wanted to make this a PR in its intermediate state just to show all of the stuff that is caught by flake8 that was not caught by pep8 alone. It's pretty cool, and was mostly just `s/pep8/flake8/g`.