add a `LockGuard` type for RAII mutex locks