refactor: replace RecursiveMutex cs_SubVer with Mutex (and rename)
Summary:
scripted-diff: rename cs_SubVer -> m_subver_mutex
-BEGIN VERIFY SCRIPT- sed -i 's/cs_SubVer/m_subver_mutex/g' ./src/net.h ./src/net.cpp ./src/net_processing.cpp -END VERIFY SCRIPT-
refactor: replace RecursiveMutex m_subver_mutex with Mutex
In each of the critical sections, only the the guarded variable is
accessed, without any chance that within one section another one is
called. Hence, we can use an ordinary Mutex instead of RecursiveMutex.
This is a backport of core#24079
Test Plan:
With Debug and TSAN
ninja all check check-functional
Reviewers: #bitcoin_abc, sdulfari
Reviewed By: #bitcoin_abc, sdulfari
Differential Revision: https://reviews.bitcoinabc.org/D13381