Switch over to application factory create_app and blueprints.

Also adds some stuff like a debug_server script, app.debug toggle via TIMERBOARD_PRODUCTION True/False (default False) and adds some missing dependencies to requirements.txt