refactor: Improve thread safety analysis by propagating some negative capabilities
Summary: This is a backport of core#25175
Test Plan:
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ninja all check-all
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-Wthread-safety-negative" ninja 2>&1 | grep "(m_tx_relay_mutex|m_most_recent_block_mutex)"
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14881