tsan: improve diagnostics for incorrect usages of mutexes