Flask app refactoring:

- app-wide objects continue being memorized
- app-wide objects can be accessed through the app object
- tidy up the setup pieces
Make sure there's no setup code executed when __init__ is imported
Get the version directly from the import of __init__
Move the version definition to setup.py
Merge pull request #7 from unaizalakain/app_refactoring

Flask app refactoring