Set app reference in init_app

https://github.com/mitsuhiko/flask-sqlalchemy/issues/82