Massive pep8/pyflakes cleanup

The pyflakes and pep8 checks should now run automatically when Travis CI builds run. I've documented which flags are ignored in .travis.yml (e.g. line length checks).
Good catch. I have no idea how we'd solve that. Should we ignore the settings files? There's not a whole lot of code there (and few potential future changes), and it's probably easier just deal with those manually.