MB-11731 Add the daemon vbucket state snapshot task.

This new daemon task will be scheduled periodically and persist
any vbucket state changes with a lower priority.

Change-Id: I2aa7dc5dda0153aac74314e239a85ad3f444c4d8
Reviewed-on: http://review.couchbase.org/39907
Reviewed-by: David Liao <david.liao@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
MB-11731 Reduce the lock overhead among flusher, VB deletion, and compaction

This change reduces the lock blocking overhead among flusher, vbucket
deletion, compaction, and snapshot tasks, by skipping the rest of
tasks if a lock is already grabbed by one task.

Change-Id: I643d7fe74150b5ead5c1368d660deb3c64dd1d01
Reviewed-on: http://review.couchbase.org/39910
Reviewed-by: David Liao <david.liao@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>