refactor: Use Mutex type for g_cs_recent_confirmed_transactions
refactor: Use Mutex type for g_cs_recent_confirmed_transactions

Summary: This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19378 | core#19378]]

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, deadalnix, majcosta

Reviewed By: #bitcoin_abc, deadalnix, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9448

Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc