Run commands with unique pgid to improve timeout cleanup

To ensure that all child processes are properly signaled to exit before
forcibly killing them, use `setsid()` in the child process to give the
child (and any grandchildren it might create) a new and unique process
group. If the command times out, kill and reap the entire process group.
Always send KILL to process group

There is not a good way to reliably detect whether all grandchildren
have exited after sending a TERM to the process group; if the child has
correctly exited, grandchildren (which may be unresponsive) will have
been adopted by init (ppid == 1) so the parent cannot wait() on them. To
ensure no stuck grandchildren are left, send a KILL to the process group
after allowing the processes time to clean up.