MB-10496 [1/6]: Initial version of HashTable defragmenter

Create a new Defragmenter task, which visits all members of the
HashTable and defragments them. Currently the defragmentation
algorithm is very naive - it simply reallocates all Blob objects
encountered, regardless of how fragmented or not the pages they reside
on. This is obviously very wasteful (as we will move object in both
fragmented and not fragmented pages on each pass), but however is
sufficient to significantly reduce RSS of the memcached process, if
jemalloc is used as the memory allocator.

jemalloc is required as it prefers low addresses during re-use;
and so the act of allocating a new Blob object, copying the old to the
new and then free()ing the old Blob will result in the new objects
being packed with other objects in the same size class.

To obtain this behaviour, we need to disable jemalloc's thread cache
for the thread which is performning the defragmentation, for the
duration of that task, and hence this requires the use of new
functions from the allocator hooks API.

Change-Id: I8f0e8daaa5e5d7ea8fde58f1c8377bf30312c85a
MB-10496 [2/6]: Implement run_defragmenter_task for ep_engine

Implement the engine API function run_defragmenter_task in
ep_engine. This allows unit-tests to explicitly trigger the
defragmenter.

Change-Id: Ieaeadfbd4186213e35a1e89bc0202d39ff27ab96
MB-10496 [3/6]: Unit test for degragmenter task

Basic smoketest for the defragmenter: Create a number of documents,
spanning at least two or more pages, then delete most (but not all) of
them - crucially ensure that one document from each page is still
present. This will result in the rest of that page being
'wasted'. Then verify that after defragmentation the actual memory
usage drops down to (close to) mem_used.

Change-Id: Ibfe8780fb02ad5eb504242b01e7583bc1e305184
MB-10496 [4/6]: Add epoch field to Blob; use as part of defragmenter policy

When a Blob object is allocated record the current 'epoch' in it -
essentially how the number of defragmenter passes which have occurred
mod 256. This can then be used to determine the age of a blob, and
consequently can be used by the defragmenter to select Blob objects
which have been in existance (and haven't changed size) for a long
period, and hence are candiates for defragmentation.

Change-Id: I6380e6601ae5ee86ca630031e4edea9711a88433
MB-10496 [5/6]: pause/resume visitor support for epStore & HashTable

Add new visiting methods to HashTable and EventuallyPersistentStore to
allow a client to pause the visit at a particular position, and then
resume from approximately the same position at a later time.

The methods operate in a similar way to the existing visit() /
visitDepth() methods, with the addition of a start_pos parameter to
specify where to start at, and returning the position the visitation
got to.

Clients would typically call pauseResumeVisit() with a default
Position initially (to start from the beginning), and then when they
want to pause they return false from their visit() method.

Change-Id: I2542efc165e3200f0cc74d8120a16e2175f1341d
MB-10496 [6/6]: Use pause/resume visitor for defragmenter task

Expand the defragmenter to make use of the pause/resume visitor
methods on epStore & HashTable. This allows it to run for a
constrained period of time, pausing (and recording how far it got) if
it reaches its time limit. It can then resume from where it left off
at the next defragmentation internatl.

Change-Id: I82520aa907bb386f9c55fc7e92ac5338bf862cdf