Support registering multiple callbacks for a single signal. This is
necessary to support multiple co-existing native process instances, with
separate SIGCHLD handlers.
Since std::function does not support equality comparison,
RegisterSignal() now accepts an optional argument to define identifier
for the callback. If multiple handlers for the same signal are expeted
to be registered, unique identifiers are used to distinguish between
The system signal handler is registered on first request, additional
callback are added on subsequent requests. The system signal handler
is removed when last callback is unregistered.