Fix the exit condition for Subprocess
Fix the exit condition for Subprocess

Subprocess a bug in which it can fail to read data buffered in pipes
after the process terminates. It currently attempts to handle this
case by calling `drain_fd` on each ready fd after detecting that the
process has exited by calling `poll`. If the process writes to the
pipe between the `select` and the `poll`, we won't attempt to read
from that pipe. This can happen if the process write to stderr, then
writes to stdout and then exits. `select` will return after the write
to stderr then the child writes to stdout and exits and then we poll.
I think there's also an edge case where the process receives an
interupt in `drain_fd` after the child has exited and catches EINTR.

Instead we should continue looping until we've received EOF or EPIPE from
each of the read pipes except the self_pipe. We can remove the termination condition
that waits for `wait_r.length == 0` since that will never be reached
since the self_pipe is never removed from wait_r and should never
be nil.

stripe/subprocess,stripe/subprocess