CBD-485 fix descriptors leak in jump_to_another_version

Change-Id: Idef3c2d31cc12483b27015e0ea7bb6848d39f512
Reviewed-on: http://review.couchbase.org/31123
Tested-by: Artem Stemkovski <artem@couchbase.com>
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
MB-9307: Add typespecs to newly added functions

Change-Id: I7d48215ef6fb760236446f5bfb4006075ba092d9
Reviewed-on: http://review.couchbase.org/30958
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Sarath Lakshman <sarathlakshman@slynux.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Fix post 3.19 v8 support related wrong typedef

Change-Id: I275fcfdf502224725337221a6caf36026dbd701a
Reviewed-on: http://review.couchbase.org/31127
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
MB-9730 Add support for couch_file to refresh fds on demand

When multiple processes hold write fds to the same file,
it is observed that some of the writes from first fd does not
get synced to file even after the second fd is closed.
Refreshing of fds is necessary to overcome this inconsistency.

Added couch_file:refresh_fds(Pid) method to refresh the
backing fds held by the couch_file process.

Change-Id: I427646e0a0707a2ccaca5af8a354552dc184dfc8
MB-9730 Integrate native viewgroup cleanup support

An external native program `couch_view_group_cleanup`
is invoked to perform viewgroup cleanup. On successful cleanup,
viewgroup couch_file processes are refreshed to use new views
after cleanup.

A comparison of time taken for cleanup before and after this change
benchmarked by running `test/11-updates-cleanup-many-views.t` with
6400000 documents are as follows:

Before:
Removed 30000 values from the index in 4.468 seconds

After:
Removed 30000 values from the index in 2.364 seconds

Change-Id: I1ef010a5c1dad8366e90dbbba4bf93117a92377f
 MB-9730 Add support to stop cleaner native process

stop_cleaner() function needs to ensure that the
viewgroup cleanup native process has exited.
Added a mechanism to send exit message to native viewgroup
cleanup process and wait for process to exit and send exit status.

Change-Id: If187e2114a0608a8f704f6b43a3c36a4817035ab
Remove an unused variable in rollback unit test

Remove an unused variable since it is violating the fact
that couch_file process pid can change in between updates since
viewgroup cleaner resets the couch file process for the viewgroup.

Change-Id: I8e3f9020e769c195970ae2984ea4bcaf2d5afee6
MB-9771 Integrate native incremental index updater

The main updater-writer process creates batches of incremental
changes to be applied to the view btrees and id btree. The list
of operations for each batch are written into a sorted file (one
for each btree in the index file). The viewgroup info along with
the sorted file paths are passed to an external native process.
The external process reads the operations from the sorted file and
applies to the btrees in the index file efficiently.

Change-Id: I122252a3803c29ac9351b8902e939c8c17c02825