MB-9515: Check the couchstore API during configure

Change-Id: I46b02c55ab7fa744ec5cafddb90d8a3075fc2fb7
Reviewed-on: http://review.couchbase.org/31313
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
MB-9730 Add `guided_purge_btree` API

This API modifies a btree based on guide functions,
purge_kp and purge_kv. It walks the btree and evaluates
each KV node or KP node using the corresponding guide function
and removes the node if the guide function signals for purging.

Change-Id: Iab42ac7260f3714b51259a1cb956e3ab9e23073e
MB-9730 Add unit tests for `guide_purge_btree` API

Change-Id: I8377db68823f18cfb5d85190adbea17701337257
MB-9730 Add support for auto-purge during modify_btree

When `modify_btree` is invoked with a list of add/remove operations,
tree node purging can be performed along with the operations applied
on the btree. Tree purging can be enabled by setting the flag,
rq.enable_purging = true and specifying rq.purge_kp and rq.purge_kv
functions.

Added unit test for auto-purge as well.

Change-Id: I2566b1947128ea7830fb61ddb7260bbb798c1e1f
MB-9730 Add equality and intersection operations for bitmaps

Change-Id: I548cc1041d06ffeeacacec0ef0b2b56ded8d83fe
MB-9730 Add purge functions for id_btree and view_btree

Implement the purge functions for conditionally purging
btree nodes based on clear_bitmask.

Change-Id: Idb26f6fb9d847395c914c1c3b5492e9507b3352a
MB-9730 Add unit tests for id and view btree purge functions

Change-Id: I40b0a8a060ef35677b6cf027fa0cf1dc8cff6373
MB-9730 Add native index view group cleanup

Implementation of native utility for viewgroup cleanup.
Details of a viewgroup can be passed to couch_view_group_cleanup command
via stdin and it will perform cleanup of nodes belonging to partitions
specified by cleanup_bitmask. Purged count can be read back from stdout.

Change-Id: I1482500dca0406a528a7b66349701a49915b3c77
MB-9730 Add support to cancel running viewgroup cleanup process

Implemented an stdin listener thread for receiving "exit"
message and die current viewgroup cleanup process immediately
without completion.

Change-Id: I2ff9305ac15fb02f9273a745439558f2846e552b
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