MB-7685: Refactor the StatsSnap task

Change-Id: I22c46bed3da65b022a76bf756715ff475bc70617
Reviewed-on: http://review.couchbase.org/24873
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>