Add support for CloseStream

Change-Id: Ied6e2e0611d737da3cd6a146ffc2c31b0666a7f8
Reviewed-on: http://review.couchbase.org/30685
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MB-9108 add vbucket failover log

 * Add failover log entry on VB state change to active
 * Send failover log with successful stream request response
 * Check if clients need to rollback when requesting a stream
 * Stat "failovers <vbid>" shows failover log as JSON
 * Persist failover log to disk
 * Load persisted log at warmup
 * Create entry at high seq on warmup if vbucket is in active state

Change-Id: Icacaedbe0c448075f475a6e33a4b929d4292889e
Reviewed-on: http://review.couchbase.org/30539
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-9638 UPR persistence sequence number command

This command is similar to the Tap checkpoint persistence command.
But we use sequence number instead of checkpoint id for UPR.
Refactored code to support both checkpoint id and seqno persistence.
The new memcached command opcode is CMD_SEQNO_PERSISTENCE 0xb7.
Added a stat "persistence_seqno".
Added a test case "upr_persistence_seqno".

Change-Id: Iec5db260e05cfa8889f253c33bb08209eb87ca2c
Reviewed-on: http://review.couchbase.org/30899
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Add a snapshot marker when backfill ends

Backfilling items from disk is considered a snapshot so we need
to make sure that we add a snapshot marker to the ready queue
once backfill finishes.

Change-Id: I171080e683087e3e6f10f43b599778a03cba0a87
Move stream class to its own source/header file

Change-Id: I9d865fd8f0129dd216bb843c23128289b79d3f99
Add an ActiveStream class

Change-Id: If884c335131da9f9138e63a2dda15d28fdc9a3b5
WIP

Change-Id: I4f5d6a49e31e992bd34b2bce5d8089ccbaffb1f4
WIP2

Change-Id: I47e25acca5c79022156074638c4ac6a139f2e275
WIP3

Change-Id: I935b9d2dcf825400cc26c08bd75d71e6e8fce6b2
WIP4

Change-Id: Ib8891dc621571d98416f910193333e0e33e6e68b