Allow db.c to exit gracefully on receiving a signal
Allow db.c to exit gracefully on receiving a signal

Some profilers (such as google profiler) won't generate a report if the
application was terminated abnormally

Change-Id: I3cd67363100859dabe17506fa1d8bb41b96a5c53
Reviewed-on: http://review.couchbase.org/26912
Tested-by: Mordechai Nunberg <e7d42768707bf23038325b0b68d4b577e5f6064a@haskalah.org>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

maxim-ky/libcouchbase,avsej/libcouchbase,senthilkumaranb/libcouchbase,couchbase/libcouchbase,avsej/libcouchbase,trondn/libcouchbase,trondn/libcouchbase,couchbase/libcouchbase,mnunberg/libcouchbase,trondn/libcouchbase,kojiromike/libcouchbase,uvenum/libcouchbase,signmotion/libcouchbase,couchbase/libcouchbase,avsej/libcouchbase,maxim-ky/libcouchbase,signmotion/libcouchbase,mnunberg/libcouchbase,mody/libcouchbase,avsej/libcouchbase,maxim-ky/libcouchbase,couchbase/libcouchbase,avsej/libcouchbase,kojiromike/libcouchbase,uvenum/libcouchbase,couchbase/libcouchbase,kojiromike/libcouchbase,couchbase/libcouchbase,mody/libcouchbase,signmotion/libcouchbase,uvenum/libcouchbase,couchbase/libcouchbase,PureSwift/libcouchbase,senthilkumaranb/libcouchbase,avsej/libcouchbase,PureSwift/libcouchbase,trondn/libcouchbase,uvenum/libcouchbase,mnunberg/libcouchbase,uvenum/libcouchbase,PureSwift/libcouchbase,signmotion/libcouchbase,mnunberg/libcouchbase,kojiromike/libcouchbase,maxim-ky/libcouchbase,mody/libcouchbase,trondn/libcouchbase,avsej/libcouchbase,mnunberg/libcouchbase,mody/libcouchbase,senthilkumaranb/libcouchbase,PureSwift/libcouchbase,senthilkumaranb/libcouchbase