As usual, we need to invalidate mutex states when something may touch them. Implement this boilerplate for the thread lock checker.
The previous refactoring is handy for listing functions on which we don't need to invalidate mutex states because we model them instead.
Additionally, i don't invalidate mutex states when any system header function is called, unless the mutex is passed directly into it. The TODO here would be to model *all* system functions that may change mutex states, and then disable invalidation for the rest of them even if they take a mutex; that's what other checkers do.