(#2018) - Fix deletion handling during replication
(#2018) - Follow up refactor
Merge branch 'master' of https://github.com/daleharvey/pouchdb