(#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

This is work in progress and some tests fail.