Use _exit instead of exit so the file descriptors aren't flushed twice in the
child processes

Submitted by: pho
Only expect timeouts on powerpc with NetBSD

Submitted by: pho
Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD

PR: 191906
In collaboration with: pho
Add pthread_np.h #include and initialize the pthread attribute on FreeBSD

Submitted by: pho
#ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
the output from the helper program

Submitted by: pho
Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c

Submitted by: pho
In collaboration with: kib
Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h