Add an equivalent of the Linux openat2 system call. This is an extension of openat(2) system call and provides a superset of its functionality. Rather than taking arguments for mode and flags, a pointer to an open_how structure is passed along with a size argument to facilitate future extensions of the system call. At present, the resolve flag is the primary differentiator between openat2(2) and openat(2), which is used to specify how all components of the pathname will be resolved.
The openat2 system call is currently used by Samba after 4.17 to create a fast-path for opening files that helps mitigate a metadata performance regression in versions after Samba 4.13 due to symlink safety checks.
This functionality is implemented via the kern_openat2 kernel syscall with kern_openat being refactored to wrap around kern_openat2. This commit does not implement openat2 resolve flags (will be added in subsequent effort).