Improve signal handling

Setting SIGCHLD to SIG_DFL doesn't cut it; we need to ctually ignore
them with sigprocmask. In addition, we need to deal with more than
SIGCHLD.

Initial patch by Paul Clements.
Remove long-outdated conditional code
Prepare for 3.3