MB-9974: Deal with several snaphots

This change is a temporary fix. It will use a lot of memory, for a
large number of mutations probably even too much. This will be fixed
some time in the future.

When requesting mutation from UPR via a stream request, the response
can consist of several snapshots. This is oppose to how the by-seq tree
in couchdb/couchstore works.

In the couchdb/couchstore by-seq tree you guarantee that when you start
requesting from any sequence number to the most current one, you will
see every document at most once.

The same guarantee holds true for a single snapshot within an UPR stream
request response. The problem is that such a response might contain
several snapshots.

In order to keep the changes within the view engine to a minimal, there
will de-duplication happening in case there are several snapshots in the
UPR stream request response. The document loader will put the items into
a list, before they end in the mapping queue. In case as second snapshot
is received (which is determined by a snapshot marker) the items in this
list will be replaced with the version of the snapshot that is currently
processed. This way the mapping queue will contain every document at most
once, which is the same guarantee as the by-seq tree gives. Hence the
rest of the code can stay the same.

Change-Id: I9685261069d1fa38958d56bc45ce37ac025e538e
Reviewed-on: http://review.couchbase.org/34332
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>