MB-9898: Refactor consumer processing of items

This change allows an upr consumer to buffer items before actually
processing them and putting them into the checkpoint queues for
persistence and replication.

This change works by buffering items into an upr stream and then
relying on a background job to periodically take each item and
process it based on how much memory is available in the system.

Change-Id: I4cffc0ccf17ebf5871d51330277e1fffe8c63497
Reviewed-on: http://review.couchbase.org/35375
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-9898: Upr consumer flow control code

Change-Id: Iba15280f6993fc1b67f089be087ea317f723a16b
Reviewed-on: http://review.couchbase.org/35419
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>