Added flake8 and pylint to setup.py.

Also made read_config() more testable. It only needs the app.config
dict, not the whole app instance.