MB-9968 Use shutdown_sync() for stopping view compactor

During a scenario when stop_compactor() is invoked by couch_view_group process,
it sends `stop` message to the native compactor driver process and block waits
for that process to exit. But if at the same time view compactor driver has
completed the native process and tries to send `compact_done` using
gen_server:call() method to the couch_view_group process, both of them can
be performing blocked call on each other and it becomes a circular dependency
entering into a deadlocks state.

The native compactor can die by itself whenever the erlang port is closed
by detecting the stdin close. Since the compactor does not operate on the
current active index file, when the compactor erlang driver process is
terminated we do not need to ensure that native process has been died.
It can detect the stdin pipe close and exit asynchronously.
Replaced shutdown_wait() method with erlang process force kill method,
shutdown_sync() to stop the running compactor.

This reverts commit d0d76be2cd926e647cc7c7f7d4c07341c9813187.

Change-Id: I34e616ee2127d8a271f4364884fb8337f91a03fa
Reviewed-on: http://review.couchbase.org/33034
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Sarath Lakshman <sarath@couchbase.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
MB-10090 Fix receive_group_header buffered stdout reader method

receive_group_header method simulates blocked read of bytes in
given length by operating on the port interface in stream mode.
In stream mode, data is received as messages asynchronously.
If data accumulator received by this method is less than the
given length, it has to wait for data to arrive through port
and append to the existing data to extend the buffered data.

The current buffer was getting replaced by newly arrived data
rather than appending it and hence it indefinitely waits for
enough bytes to arrive. The test needs to use 1024 vbuckets
to go through this code path.

Change-Id: I757ecda73ac29ffba983aed64362cdf9b2f9914c
MB-7629 Fix view compactor incremental progress stats

The native view compactor can now send intermediate
progress of how much kvs are written at every percentage
progress intervals.

Change-Id: I4c9ddbfee0b0531733552d54f2eb92a5fe44cf6b
Add support for stopping native index builder

Similar to the native compacter and native btree updater,
added ability to send a stop message to the index builder
and wait for native process to exit.

Change-Id: Ibda0ef728100266508407f6512f6f12dac2080d3
Remove sorting step for mapreduce initial index builder

Native btree index builder takes care of sorting before
the btree build. Hence sorting step is not required from
erlang side for mapreduce views.

Change-Id: Iafee54d0d65ca4c5cd90389d91e258792776989e