[sanitizer] Implement wait4 and waitpid syscall hooks.