New waitpid-handler functions to run callbacks when a child exits.

Also, move 'procmon' into libor_event library, since it uses libevent.
Use waitpid code to learn when a controlled process dies

This lets us avoid sending SIGTERM to something that has already
died, since we realize it has already died, and is a fix for the
unix version of #8746.
On Windows, terminate processes by handle, not pid

When we create a process yourself with CreateProcess, we get a
handle to the process in the PROCESS_INFO output structure.  But
instead of using that handle, we were manually looking up a _new_
handle based on the process ID, which is a poor idea, since the
process ID might refer to a new process later on, but the handle
can't.
New testing-only tor_sleep_msec function

In the unit tests I want to loop with a delay, but I want less than
a 1 second delay.  This, sadly, requires compatibility code.
More unit tests for process spawning

Try killing a running process; try noticing that a process has
exited without checking its output; verify that waitpid_cb (when
present) is set to NULL when you would expect it to be.
refactor win/nix handling for test_spawn_background*()

Instead of having a #if ... for every function, just define
TEST_CHILD to the right patch and EOL to the expected line terminator.
changes file for 8746
Merge branch 'bug8746_v2_squashed'

Conflicts:
	src/common/include.am
Add ATTR_UNUSED to HT_FIND

The fix for bug 8746 added a hashtable instance that never actually
invoked HT_FIND.  This caused a warning, since we didn't mark HT_FIND
as okay-not-to-use.