refactor: Use Mutex type for g_cs_recent_confirmed_transactions
Summary: This is a backport of 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