adapt pouchdb.changes() to pouchdb 3 event handler