This is another step to transit CTxMemPool::cs from RecursiveMutex to Mutex.
Split out from #19306. (Along with #19652, #19854 and #19872 it is more than 2/3 of the way to the final goal).
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.