Handle SIGHUP events only in primary monitor thread.  Add selective backtrace

This reenables the stack backtrace support of monitr when receiving a SIGHUP.

In addition, code is now more thread-friendly.  Note that signals can be delivered to *any* thread inside a process which has not blocked the signal. 

SIGHUP catcher uses only async-safe functions
- sets a sig_atomic_t variable
- calls write() to write a single character to the end of the pipe which the monitor thread is about to read