MB-10472: Don't buffer items in memory

The items are now put directly into a queue (without keeping all the
items in memory first)  which can be processed in a streaming way.
This should get the memory usage back to a level that is similar
prior to the UPR merge.

Change-Id: Id7df4a6e250fee662f6d8ebf78d35d959a69d482
Reviewed-on: http://review.couchbase.org/37179
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>