bp:MB-7671 Check fragmentation before compacting vbucket.
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 <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>
Tested-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>

membase/ns_server,ceejatec/ns_server,nimishzynga/ns_server,vzasade/ns_server,pavel-blagodov/ns_server,t3rm1n4l/ns_server,mschoch/ns_server,daverigby/ns_server,vzasade/ns_server,daverigby/ns_server,ceejatec/ns_server,ceejatec/ns_server,membase/ns_server,nimishzynga/ns_server,nimishzynga/ns_server,pavel-blagodov/ns_server,nimishzynga/ns_server,t3rm1n4l/ns_server,daverigby/ns_server,vzasade/ns_server,daverigby/ns_server,mschoch/ns_server,membase/ns_server,t3rm1n4l/ns_server,mschoch/ns_server,membase/ns_server,mschoch/ns_server,membase/ns_server,vzasade/ns_server,membase/ns_server,mschoch/ns_server,t3rm1n4l/ns_server,nimishzynga/ns_server,nimishzynga/ns_server,mschoch/ns_server,pavel-blagodov/ns_server,t3rm1n4l/ns_server,ceejatec/ns_server,ceejatec/ns_server,pavel-blagodov/ns_server,daverigby/ns_server,ceejatec/ns_server