Fix errors in mutex debugging (#1235) (#1407)
Fix errors in mutex debugging (#1235) (#1407)

* Store the lock owner thread rather than `m_locked`, so that multiple threads
  accessing the same mutex do not give false positives, but recursive locks on
  the same thread are still caught.

* Match the std::mutex API: return bool from `try_lock()` and remove `locked()`.
  No code is using this, but any new code that did would only build in either
  release or debug configuration.

Signed-off-by: Brecht Van Lommel <d22bc6bad61129b636affa2511b3ce522cd74bb3@blender.org>
AcademySoftwareFoundation/OpenColorIO,AcademySoftwareFoundation/OpenColorIO,AcademySoftwareFoundation/OpenColorIO,AcademySoftwareFoundation/OpenColorIO,AcademySoftwareFoundation/OpenColorIO