ptrace: Return current ptracee only if it matches its ptracer wait options.

Sadly, I was not able to test this fix reliably.
ptrace: Add a workaround to make GDB usable under PRoot.

GDB assumes the program is loaded in memory once execve(2) has
completed, however this is not the case under PRoot since it replaces
the executed programs with a loader (the ELF interpreter for now).  As
a consequence, only the loader is in memory and GDB will fail to set
breakpoints on the program.  A workaround is to delay the execve(2)
notification until the ELF interpreter has loaded the program in
memory, that is, until the first PR_close has completed.