(#993) - Use allDocs to batch generation 1 docs

Batch fetching docs of generation 1 via `allDocs` api in replication.

* handle deleted docs correctly (they could have been deleted via POST with
`_deleted: true` without removing data)
* handle docs, which revision has changed after change has been emitted
* fetch docs with attachments in a single `attachments: true` call