MB-9968 Add support for native view components to exit on pipe close
MB-9968 Add support for native view components to exit on pipe close

The erlang side spawns view group native programs cleaner, updater
and compactor and sends messages via stdin. If the parent erlang
process gets killed, these processes needs to die by itself.
A read() call on stdin pipe returns zero if the other end has closed
the pipe. Added a check to identify stdin close and exit the process.

Change-Id: I34e616ee2127d8a271f4364884fb8337f91a03fa
Reviewed-on: http://review.couchbase.org/33033
Reviewed-by: Volker Mische <fb414f8ac0dbbf87663550ae4ef5fc95b1041941@gmail.com>
Tested-by: Volker Mische <fb414f8ac0dbbf87663550ae4ef5fc95b1041941@gmail.com>

vmx/couchstore,abhinavdangeti/couchstore,jimwwalker/couchstore,jimwwalker/couchstore,jimwwalker/couchstore,vmx/couchstore,couchbaselabs/couchstore,abhinavdangeti/couchstore,couchbaselabs/couchstore,vmx/couchstore,couchbaselabs/couchstore,abhinavdangeti/couchstore