Rewrite file descriptor handling.

1. Instead of waiting on a single tagged descriptor, use different ones for stderr/stdout.
2. Close file descriptors with closerange rather than proc magic.
3. Do not remove the cloexec flag; it does not affect fork.