Add missing wallet locks:
- Calling the function GetConflicts(...) requires holding the mutex
cs_wallet
- Calling the function IsSpent(...) requires holding the mutex
cs_wallet
- Accessing the variables mapKeys and mapCryptedKeys requires holding
the mutex cs_KeyStore
- Accessing the variable nTimeFirstKey requires holding the mutex
cs_wallet
- Accessing the variable mapWallet requires holding the mutex cs_wallet
- Accessing the variable nTimeFirstKey requires holding the mutex
cs_wallet
Backport of core PR11634.