runqueue: More carefully handle the sigchld handler

We've noticed hanging processes which appear to be looping around
waitpid. Its possible multiple calls to teardown are causing problem
or in theory multiple registrations (although the code should not
allow that). Regardless, put better guards around signal handler
registration.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>