Chunk missing revisions before attempting to save on target

In cases with pathological documents revision patterns (e.g., 10000 open
conflicts and tree depth of 300000 on a single document), attempting to
replicate the full revision tree in one batch causes the system to crash by
attempting to send an oversized message. We've observed messages of > 4GB in the
wild.

This patch divides the set of revisions-to-replicate for a single document into
chunks of a configurable size, thereby allowing operators to keep the system
stable when attempting to replicate these troublesome documents.

BugzID: 37676
I suggest;

```erlang
    chunk_revs(Revs) ->
        chunk_revs(Revs, list_to_integer(config:get("mem3", "rev_chunk_size", "5000"))).

    chunk_revs(Revs, Limit) ->
        chunk_revs(Revs, {0, []}, [], Limit).
```
that way the mutable config part is separated from the purely functional part that follows.