MB-9785: Allow the checkpoint manager to work with upr streams

This is a large change that does a few things other than just
allowing a stream to access the checkpoint manager. The main
feature of this change is that the Stream class is now a state
machine that contains states for pending, backfilling, in-memory,
and dead and the stream moves through these states based on how
far behind or up to date the mutations being sent from the stream
are. The Stream class also becomes the main place for handling
mutations in an UPR connection.

Change-Id: I4f5d6a49e31e992bd34b2bce5d8089ccbaffb1f4
Reviewed-on: http://review.couchbase.org/31460
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>