CA-147284: don't use non-async-signal-safe functions for SIGHUP

This patch removes the usage of non-async-signal-safe functions when
handling SIGHUP and replaces it with an event.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>