[libc] Add a minimal implementation of the POSIX fork function.

A very simple and minimal implementation of fork is added. Future
changes will add more functionality to satisfy POSIX and Linux
requirements.

An implementation of wait and a few support macros in sys/wait.h
have also been added to help with testing the fork function.

Reviewed By: lntue, michaelrj

Differential Revision: https://reviews.llvm.org/D135131

GitOrigin-RevId: e3638e83db086e77243d0673a4ce8a0b4b330d42
21 files changed