avoid potential Logger deadlocks in signal handling
If any combination of signals are sent to Zbatery in a short
period of time, the Mutex used by the default Logger
implementation may deadlock since Mutex synchronization is not
reentrant-safe.
By spawning a thread, we can take advantage of the thread-safety
and avoid the reentrancy-safety issue of acquiring a mutex
inside a signal handler.
Users of alternative logger implementations (or monkey-patched
ones) are possibly not affected. Users of the logger_mp_safe.rb
monkey-patch distributed[1] with unicorn are not affected.
[1] http://unicorn.bogomips.org/examples/logger_mp_safe.rb