Add junk code for manual verification of valgrind

Just enough to check that it's installed and basic functions work.
Clean up some debug messages
Don't scan Valgrind's preloads for sections.

Which was harmless enough on Linux but the Darwin versions of these
confuse the section handling code for no benefit, so just ignore them.
Some junk code for exploring signal delivery

on Darwin with and without Valgrind.  Which turns out to be a mess.

Under Valgrind, SIGCHLD is delivered pseudo-asynchronously by the
Valgrind runtime polling the kernel for pending signals at the
completion of certain system calls.  Valgrind has an async signal
handler for SIGCHLD which is supposed to be enabled during long-running
system calls like poll() to allow the call the return early with EINTR,
but at least in 3.10 this is just broken.  Instead the poll() times out
and the signal is delivered soon afterward (in this code, when the next
sigprocmask() call clears the signal mask).

Valgrind seems to handle this just fine under Linux.  Oh well.
Improve debugging prints in main loop
Main loop logic is more resilient

and less dependent on SIGCHLD being delivered in some semblance of good
time.  Explicitly manage the difference between finished and reaped
children in the children_ list, instead of reaping each child as it
finishes and removing it from the list.  This allows us to mix together
children reporting finished (either with an explicit FINISHED message or
by dieing unexpectedly and dropping the pipe) with reaping.  It also
allows reaping to be driven by logic other than delivery of SIGCHLD.  We
do still notice when poll() breaks due to SIGCHLD, and use it to try to
reap early, but no longer rely on this behaviour.

This allows the end of a test to be detected in less than 90 seconds
when running under Valgrind on Darwin.
Enforce order of child reaping

which turns out to be very important to keep the order of messages from
the text listener consistent which enables us to pass all the tests
which rely on golden output.  This is in theory slightly slower but I'm
not willing to sacrifice reliability for speed here.