Re-architure pagure
- Move the session to flask.g instead of importing it everywhere
- Move the config to its own module
- Move the code from pagure/__init__.py to pagure.lib, pagure.utils.py
and pagure.flask_app.py
- Add an application factory to instanciate and create the flask app
- Move the UI to be a blueprint
Adjust the services for these changes.
Adjust all the tests to pass with these changes.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>