CBIDXT-246 Exit daemon processes on stdin close

The indexer and projector processes will be spawned by ns_server
and babysitter will monitor them. When ns_server crashes or if it
needs to force kill the spawned processes, it would close the stdin
pipe. All the processes spawn by the ns_server should be able to die
by itself whenever stdin pipe is closed.

Change-Id: I3d8a9fef843032fbf57565c34c61608ea57ee9a0
Reviewed-on: http://review.couchbase.org/43037
Reviewed-by: Pratap Chakravarthy <prataprc@couchbase.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Tested-by: Sarath Lakshman <sarath@couchbase.com>