Gracefully shutdown in the presence of blockable signals.

TraceThreadListener objects will now setup the current thread to block all
signals that can be blocked without causing undefined behaviour: that is, all
except SIGBUS, SIGFPE, SIGILL, and SIGSEGV.

During the TraceThreadListener's enterNotification(), pending signals will be
checked for. If any signal is pending, it will be collected using sigwait() --
because Mac OS X doesn't have sigwaitinfo() or sigtimedwait(). The thread
listener will then perform a synchronized exit(), so that the trace information
is written correctly.

In the future:
 - Write information about the signal into the trace.
 - Synchronize stop, write trace information, then abort() rather than exit().
 - Support SIGBUS, SIGFPE, SIGILL, and SIGSEGV.