Modify set_exit_on_term

This implementation is not thread-safe and will cause harmful exit,
but at least it will not cause deadlock on exit.
Remove unnecessary errno

sigwait doesn't set errno
Remove calling sigprocmask in thread generated in set_exit_on_term

In pthread, child thread's signal mask inherits parent thread's one.
Use pthread_sigmask instead of sigprocmask
Fix servers (distributed mode) to block signals
Fix jubakeeper to block signals
Fix jubavisor to block signals
Refactor lock service
Add prepare_signal_handling and set_action_on_term
Fix exceptions
Merge branch 'fix-signal-handlers' into graceful-exit
Implement graceful exit (server only, not mixed)
Stop mixer when terminated
Enable join on keeper
Refactor server termination
Enable graceful exit on jubavisor
Remove set_exit_on_term
Aggregate cleanup functions
Close lock service explicitly when server disposed
Cosmetics