taskd.pl: avoid spurious SIGCHLD from jobd restarter
Make sure that any SIGCHLD generated as a result of scheduling and/or
cancelling the jobd.pl restarter process do not interfere with normal
taskd child tracking activities.
This is accomplished by 1) temporarily changing $SIG{CHLD} in some
places 2) making sure to waitpid for any outstanding children related
to scheduling/cancelling the jobd restarter and 3) double-forking the
jobd.pl restarter child so that when it finally does its thing it
does not generate a SIGCHLD back to the taskd.pl process.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>