set self.app and self.datastore in init_app

If app and datastore were not set in the constructor, they should be set when init_app is called.