introducing msg_type_strings[] array of message type string reprs
fix deadlock in sighandler
more fix for sighandler
add safe_snprintf
change all loga to log_safe in signal handler.
Merge pull request #231 from idning/sighandler

fix deadlock in sighandler
formatting fixes