Add a lock on cs_main while modifying the config in setexcessiveblock
Summary:
Modifying the config in one thread while validation may be occurring
in another can lead to unexpected behavior. Other calls to config.Set*() calls only
exist in init.cpp so no other locks should be necessary.
Revealed by this TSAN failure: https://build.bitcoinabc.org/repository/download/BitcoinABC_ResourceIntensiveBuilds_BitcoinAbcMasterTsan/76935:id/sanitizer_logs.tar.gz%21/ubsan.log.8739
Test Plan:
ninja check check-functional
TSAN still fails though. It appears that there is a locking issue in the wallet.
Reviewers: #bitcoin_abc, nakihito, Fabien
Reviewed By: #bitcoin_abc, nakihito, Fabien
Subscribers: nakihito
Differential Revision: https://reviews.bitcoinabc.org/D6543