MB-9666: Persist the partition versions/failover log

With UPR there needs to be a way to determine where the
data came from. Hence the failover log of every partition
is persisted on disk.

This information will be used to determine whether a rollback
is needed or not in certain failure cases.

Change-Id: I950a102e18ab4223908c4b42f962d4a742840988
Reviewed-on: http://review.couchbase.org/30794
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: buildbot <build@couchbase.com>
Disable nonworking test for windows

Change-Id: Icfa4bc5df823b254424a294fc64a2df7a4b88991
Reviewed-on: http://review.couchbase.org/31767
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Fix expected value for win32

Change-Id: I7c88ad1a7e335f02444eb329dbcfa91d129d4d5b
Reviewed-on: http://review.couchbase.org/31768
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
MB-9771 Add native incremental index updater

Implementation of native external program for performing
incremental update into the index. The external program receives
necessary info such as index file location, header pos, sorted
operation list files, buffersize, etc via stdin and it efficiently
performs bulk updates to the view btrees and result stats are
sent out via stdout.

Change-Id: Ib35f741e5b615c4dd7f6c3527079538dd56373a0
MB-9771 Exchange viewgroup header via stdin/stdout

For view index incremental updater, change has been made
to receive viewgroup header via stdin and send back new header
after performing incremental updates via stdout. This avoids
writing of intermediate index header from native updater.

Change-Id: I68aecd2cb305a45a46f3d3fb45c705f2eab72ccc
MB-9771 Perform view ops sorting in incremental index updater

Change-Id: Ib7a135d68504137c27535df49f402e5ddf5102b0
Fix error codes in native index builder and index cleaner

Change-Id: I8dc0bb742ae51fb3112f038969ef00d81aae22ce
Remove redundant code for getting error string

Change-Id: I6369a14895d71fed61e2a45fe8d9aa833374e631
Add btree lookup comparator helper for handling special cases

Btree lookup api has the option of doing full btree iteration
by adding a NULL lowkey in the lookup request keylist. Added a
comparator wrapper to handle this special case so that any of
the comparator implementations need not handle this special case.

Change-Id: I963dcab73da18cc2d4eb25e393581e8341452cf4
Move arena_copy_buf method to util.cc

Change-Id: I2a80750038ce110a41f6903295f0655ae27468dc
MB-7629 Add native viewgroup compactor

Implementation of native view index compactor.
The native program receives viewgroup header info through stdin
and it creates a new index file and recreates all view btrees
and id btree. The resulting index header is written out to stdout.

Change-Id: I0c9c9ff33d3e005f22cc848c85d708b158d806e4
MB-7629 Add filter support for view compactor

A filter bitmask can be used to optionally ignore kvs
from certain vbuckets while rewriting the btrees to
the target index file during compaction.

Change-Id: I1e37834f062de10da29208a88619c5e3580f4de6
MB-7629 Add option to skip sorting in native btree updater

For compactor delta logs update, we do not want to
sort the log files since they are already sorted.

Change-Id: I298db564db2ebba677f0aa58924d97461348a0d5
MB-7629 Implement view compactor incremental progress stats

When view compactor makes progress, a stats callback
is used to update the current progress of inserted kvs.
For every percentage progress, the compactor program sends
inserted count stats through stdout.

Change-Id: I550a8ed077e6dda78753f4a944d0bff36a624540