ENH: pep8

`autopep8` corrected ~3,800 lines (!). I've gone through and dealt with `pyflakes` and remaining PEP8 errors. I have also added `flake8` to Travis.