Before, the APIManager.init_app() method would store the Flask
application provided to it as `self.app`. This violates the rules for
approved Flask extensions, as it makes it impossible to initialize
multiple Flask applications in parallel.
This also fixes an issue with providing a session or Flask-SQLAlchemy
database object in the constructor of APIManager, and later initializing
the Flask application.
This fixes issues #313 and #389.