[libc] Implement pthread_sigmask (#198682)

* Extract `rt_sigprocmask` syscall wrapper into the
libc/src/__support/OSUtil/linux/syscall_wrappers/ directory
* Convert all existing users of this syscall, and simplify the logic
where applicable.
* Implement `pthread_sigmask`, which is effectively another POSIX
wrapper around `rt_sigprocmask` syscall similar to `sigprocmask`

GitOrigin-RevId: b996b4eebbedb3b96b584e4db244b6ce685fae45
17 files changed