Add exit message listener thread for view file merger

Add support for view file merger process to exit if an
"exit" message arrives or stdin pipe is closed.

Change-Id: I5dd812f002222241ee0362601409d19b84067679
Reviewed-on: http://review.couchbase.org/36263
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>