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 <volker.mische@gmail.com>
Tested-by: Volker Mische <volker.mische@gmail.com>