Configure a Flask application to use this ZODB extension.

def init_app(self, app):
        """Configure a Flask application to use this ZODB extension."""
        assert 'zodb' not in app.extensions, \
               'app already initiated for zodb'
        app.extensions['zodb'] = _ZODBState(self, app)
        app.teardown_request(self.close_db)