[libc] Add implementations of the POSIX creat and openat functions.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D118435