set self.app and self.datastore in init_app
Merge branch 'set-app-datastore' into stable