Only attach to the "root" process forked in main.

ptrace options are inherited so they only need to be set for the root process.
Additionally, we no longer are concerned with the race conditions of
PTRACE_TRACEME since we only use PTRACE_ATTACH for attaching to the root
process. We still change the clone flags as a fallback if the kernel version
is too old to use ptrace options.