add a `LockGuard` abstraction for RAII mutex locks