Bug #431: Fix signal handler

The signal handler implementation called [async-signal-unsafe functions](https://github.com/oetiker/rrdtool-1.x/issues/431 "Check implementation for signal handling"). Now I suggest to handle corresponding notifications by the interface "[sigwaitinfo()](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigwaitinfo.html "wait for queued signals")" in a separate thread.