Implement the debugger attached check for FreeBSD
On FreeBSD we can call procctl(P_PID, getpid(), PROC_TRACE_STATUS)
to
determine whether a debugger is attached. While touching this code, also
implement unsetDumpable() for FreeBSD and factor out the debugger attached
check into a separate function.