support for deferred initialization

The `init_app()` method has been added so that the `Database` object can be instantiated without requiring an `app` object.