[libc] Add a multi-waiter mutex test.

A corresponding adjustment to mtx_lock has also been made.

GitOrigin-RevId: 8e488c3cc0da71afbe75963033e86bf32ee56c11
2 files changed