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
Reviewed-on: http://review.couchbase.org/31245
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
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