MB-11980: Fix bugs caused from persisting the current snapshot

There are two issues fixed here. One is around the current
snapshot not being updated properly during bucket flush. The
second is an issue caused by persisting the wrong information
for the high seqno, snap start seqno, and snap end seqno during
the snapshot vbuckets task. These values should remain the same
as they were after the last vbucket persistence task otherwise
we might persist incorrect values.

Change-Id: Ie4a357270b52bd35b5f29018f24fd3550913f1cc
Reviewed-on: http://review.couchbase.org/40707
Reviewed-by: Sundararaman Sridharan <sundar@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-12032: Clean up TaskQs after last bucket deletion

Without this sometimes threads can end up sleeping on
a high priority Q even when none exist.
This can result in minor slowdown rarely in some platforms

Change-Id: I58cfe9234e17b9b5502f780c7e334574f64fb30d
Reviewed-on: http://review.couchbase.org/40741
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Sundararaman Sridharan <sundar@couchbase.com>
MB-11973: Only grab items from the chk manager one chk at a time

We should only grab a single checkpoint at a time from the checkpoint
manager in order to make sure that the replica vbuckets cannot move
into the open checkpoint. This will also help make sure we don't
copy too make items into an upr stream.

Change-Id: I519353df69cf389e6f32f77ffc6afe97dfba7b36
Reviewed-on: http://review.couchbase.org/40765
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-12042 check for existence of vbucket in warmup callback

Change-Id: Iab0ad237392d681f28b91c29dc51b7631141e187
Reviewed-on: http://review.couchbase.org/40849
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Sundararaman Sridharan <sundar@couchbase.com>
Merge remote-tracking branch 'gerrit/3.0' into HEAD

Change-Id: Ief314ec953a5847ce4a3f555e9055cae6e2a504d