Convert exit codes to PTRACE_EVENT_EXIT events.

These exit codes should not be seen --- a PTRACE_EVENT_EXIT usually comes first
--- but we are seeing them with no preceding PTRACE_EVENT_EXIT.
Disarm resched events while we single-step to a safe place to deliver a signal.

We were disarming those events only at some points. Disable them at all points
except during untraced_syscall.

This still doesn't handle the case where we single-step into an untraced
syscall and desched event arrives during that call.
Fix up detach_and_reap() to aggressively PTRACE_DETACH, and let it do all reaping; don't call wait() from kill().