Use the libc clone wrapper in sys_clone.

Previously, we directly invoked the syscall, which would not update
libc's PID cache in the child. Although the libc wrapper function
updates the PID cache, it unfortunately requires that the child run on a
different stack, even if CLONE_VM is not specified. We work around this
by briefly switching stacks in the child, then using longjmp to switch
back. This gives us a version of clone with fork-like behavior, which is
what we need for starting processes in new namespaces.

BUG=312380

Review URL: https://codereview.chromium.org/801033002

Cr-Commit-Position: refs/heads/master@{#308510}
3 files changed