MB-8274 remove mutex in CouchNotifier::selectBucket()

The selectBucket() does not require to lock mutex because it is
being synchronized by its callers. Otherwise, this could cause
a deadlock when resetConnection() is being initiated by the same
caller.

Change-Id: Ibe1f4837e9550b7a25534db7e5557be878d83a36
Reviewed-on: http://review.couchbase.org/26300
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Jin Lim <jin@couchbase.com>
MB-8231 flusher must continue checkpoint persistence for empty vbucket

This fixes the current doHighPriority logic that incorrectly assumes
there must be always pending mutation (low priority vbucket
persistence) when more than one vbucket is marked for checkpoint
persistence. Otherwise, this could cause the rebalance to hang when
ns server issues the checkpoint_persistence cmd over empty vbucket or
vbuckets being created.

Change-Id: I4d23d1d49c8f6e9c23041afbf65137312e77ce2f
Reviewed-on: http://review.couchbase.org/26275
Tested-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Jin Lim <jin@couchbase.com>
MB-7938 move non-thread safe rejectQueues to vbucket

EP Store's global rejectQueue could cause incorrect
reference to its b-tree elemenet while multiple threads
concurrently making insert and or delete. This could
possibly cause data loss or incorrect accounting of
disk queue size. Moving it to each vbucket will address
these issues without introducing a new synchronization
primitive like mutex.

Change-Id: If08245b278756940703ac3f04757a176cb9c6861
Reviewed-on: http://review.couchbase.org/26242
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Jin Lim <jin@couchbase.com>
MB-7735: Fix to a race in notifying / releasing TAP connections

Change-Id: I35deeeaab98235500d9ba22c213c413eac1fbc04