bp:MB-7671 Check fragmentation before compacting vbucket.

Backporting for MB-7074. Also includes prep-commit backport.

When we decide to compact or not to compact a bucket we just take a
random sample of vbuckets and check aggregated fragmentation of these
vbuckets. Although not very likely, it's possible that we'll decide to
compact entire bucket when only few vbuckets have high
fragmentation. To avoid an overhead of compacting vbuckets that don't
really need thie, now we check fragmentation of every single vbucket
before compacting it.

Change-Id: I7609a78cfcdb12e54c0e0ddcd08ef3be35c78bd6
Orig-Reviewed-on: http://review.couchbase.org/24280
Orig-Reviewed-on: http://review.couchbase.org/24279
Reviewed-on: http://review.couchbase.org/24391
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>