MB-11578 Crash due to multiple exit calls

Parent thread and child thread were calling the exit() at the
same time and during flushing the buffers in exit(), crash happened.
Replaced exit with _exit() in child thread.

Change-Id: Ib571ed8c2a6f7261d878bf65b3b9c3237984463d
Reviewed-on: http://review.couchbase.org/39075
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>