Since signals will no longer be handled once foreman goes into
`terminate_gracefully`, default signal handlers are restored so as
not to cause it to get stuck in an unTERMable state.
This necessitates not using the process group for signalling
except as a last resort, as foreman itself will receive the signals
it sends. This splits `killall` into two methods, one which
signals only processes foreman itself has started, and one which
signals all processes in the process group to try to clean up
more aggressively, and then reworks `terminate_gracefully` to use
them.

It looks like the Travis build is failing because this patch restores the default signal handlers at the start of shutdown (as the queue won't be read again), and killing a process group with kill( "-#{signal}", Process.getpgrp ) sends the TERM to the sending process as well, so it terminates the foreman process.

A better behavior would be to split killing children gracefully from killing the whole process group so you can try the first, and then fall back to the second in the timeout. The second commit does this.