[libc][NFC] Move the mutex implementation into a utility class.

This allows others parts of the libc to use the mutex types without
actually pulling in public function implementations.

Along the way, few cleanups have been done, like using a uniform type to
refer the linux futex word.

Reviewed By: michaelrj

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

GitOrigin-RevId: 004c7b1da6cfea1d1f09535607a8c7c2f051e8d5
11 files changed