ptrace: Fix __WCLONE and WNOHANG options of waitpid(2).

This patch makes PRoot more transparent to GDB.  For instance, when
GDB is built in debug mode:

Before:

    linux_nat_wait: [process 28322]
    LLW: enter
    LNW: waitpid(-1, ..., __WCLONE | WNOHANG) returned 0, ERRNO-OK
    LNW: waitpid(-1, ..., WNOHANG) returned 0, ERRNO-OK
    sigchld
    LNW: waitpid(-1, ..., __WCLONE | WNOHANG) returned 28322, ERRNO-OK
    LLW: waitpid 28322 received Trace/breakpoint trap (stopped)
    LLW: Candidate event Trace/breakpoint trap (stopped) in process 28322.
    LLW: trap ptid is process 28322.
    LLW: exit

Now, it looks exactly the same as if PRoot was not there:

    linux_nat_wait: [process 27882]
    LLW: enter
    LNW: waitpid(-1, ..., __WCLONE | WNOHANG) returned -1, No child processes
    LNW: waitpid(-1, ..., WNOHANG) returned 0, No child processes
    sigchld
    LNW: waitpid(-1, ..., __WCLONE | WNOHANG) returned -1, No child processes
    LNW: waitpid(-1, ..., WNOHANG) returned 27882, No child processes
    LLW: waitpid 27882 received Trace/breakpoint trap (stopped)
    LLW: Candidate event Trace/breakpoint trap (stopped) in process 27882.
    LLW: trap ptid is process 27882.
    LLW: exit
ptrace: Fix (1/2) SIGTRAP events caused by execve(2) when !PTRACE_O_TRACEEXEC.

If the PTRACE_O_TRACEEXEC option is not in effect, all successful
calls to execve(2) by the traced process will cause it to be sent a
SIGTRAP signal, giving the parent a chance to gain control before the
new program begins execution. [...] the PTRACE_O_TRACEEXEC option
disables legacy SIGTRAP generation on execve(2).

-- man 2 ptrace

PRoot always enables PTRACE_O_TRACEEXEC, so it never gets the bare
SIGTRAP event sent once an execve(2) as successfully returned.  To
emulate a correct behavior for ptracers that doesn't enable
PTRACE_O_TRACEEXEC, PRoot converts the execve(2) sysexit into this
SIGTRAP, if the ptracer doesn't monitor syscall events.  TODO:
otherwise, chain SIGTRAP.

The wrong behavior was first detected with GDB:

  $ proot gdb --args foo
  [...]
  (gdb) catch syscall close 3
  (gdb) run
  [...]

The stopping message was:

  Catchpoint 1 (returned from syscall close), 0x000055555556cda7 [...]

Instead of:

  Catchpoint 1 (call to syscall close), 0x00007ffff7df1da7 [...]

Last but not least, the ptrace-2 test program was extended to make
behavior comparison easier.