Basic subprocess support

This patch adds a basic interface for starting subprocesses and
executing programs within them.  It's meant to be a C equivalent of
Python's `subprocess` module.  The API currently includes the ability to
capture stdout and stderr, and to propagate any termination signals, but
we haven't implemented that yet.
Propagate termination signals to child processes

The `cork_subprocess_start_and_wait` function now catches the `SIGHUP`,
`SIGINT`, and `SIGTERM` signals, and propagate them on to child
processes.  If any of the signals is currently being ignored by the
process, they will still be ignored.  (The glibc documentation claims
that this is important to interact nicely with “non-job-control
shells”.)

The documentation used to say that this could be controlled on a
per-subprocess basis using a flag, but the way I've actually implemented
it is to always propagate those signals on.
Capture stdout and stderr of subprocesses

We now actually do something with the stream consumers that you pass in
to the `cork_subprocess_new_exec` function.  For any non-NULL consumers
that you provide, we create an unnamed pipe to capture the corresponding
output stream from the subprocess.  Instead of using a simple
`waitpid(3)` call to wait for all of the child subprocesses to exit, we
now use a `select(3)` loop to give us a chance to drain the stdout and
stderr pipes, passing any data that we read into the corresponding
stream consumer.
Controlled draining of subprocesses

You can now have more control over how and when we try to read data from
the stdin and stderr streams of a group of subprocesses.  We've added a
new “subprocess group” object that contains the state that carries over
between function calls.  We still need a global reference to the current
subprocess group for our signal handlers, and so we're still not
thread-safe.
Subprocesses in C

You can now create a subprocess object that executes some C code
(defined in the same executable) rather than executing a separate
executable.  The older “exec” subprocess object is now a special case of
the new “arbitrary C code” subprocess object.
Subprocess support on Mac OS X

This patch adds some fixes that make the subprocess implementation work
on Mac OS X.  There were two bugs in the previous design.

First, we would only read from the stdout and stderr pipes while the
corresponding child process was still running.  We actually want to keep
reading from the pipes for as long as they still have data; the child
might finish before we have a chance to drain any data still left over
in the pipes.

Second, it looks like SIGCHLD signals can be “merged” together on Mac OS
X — i.e., we can receive a signal SIGCHLD when there are multiple child
processes that have finished.  So we need to repeatedly call
`waitpid(2)` (non-blocking) until we've reaped as many child processes
as we can.

I've also added a slew of debug statements which should help diagnose
any problems in the future.
Merge branch 'feature/fork-exec' into develop

* feature/fork-exec:
  Subprocess support on Mac OS X
  Subprocesses in C
  Controlled draining of subprocesses
  Capture stdout and stderr of subprocesses
  Propagate termination signals to child processes
  Basic subprocess support