This is another step (after #19854) to transit CTxMemPool::cs from RecursiveMutex to Mutex.
Split out from #19306. Thread safety annotations, lock assertions, and required explicit locking added. No behavior change.
Please note that now, since #19668 has been merged, it is safe to apply AssertLockHeld() macros as they do not swallow compile time Thread Safety Analysis warnings.