obsd-nat: Various fixes for fork following.
- Don't use #ifdef's on ptrace ops. obsd-nat.h didn't include
<sys/ptrace.h>, so the virtual methods weren't always overridden
causing the fork following to not work. In addition, the thread and
fork code is intertwined in ::wait and and the lack of #ifdef's
there already assumed both were present. Finally, both of these
ptrace ops have been present in OpenBSD for at least 10 years.
- Move duplicated code to enable PTRACE_FORK event reporting to a
single function and invoke it on new child processes reported via
PTRACE_FORK.
- Don't return early from PTRACE_FORK handling, but instead reset
wptid to the correct ptid if the child reports its event before the
parent. This allows the ptid fixup code to add thread IDs if the
first event for a process is a PTRACE_FORK event. This also
properly returns ptid's with thread IDs when reporting PTRACE_FORK
events.
- Handle detach_fork by skipping the PT_DETACH.