refactor: add kernel/cs_main.*
Summary:
No more:
// Actually declared in validation.cpp; can't include because of circular dependency. extern RecursiveMutex cs_main;
Note that including validation.h still implies that cs_main is available. In the long term we can expect cs_main to become a validation specific lock. No need to add the new include in all source files already including validation.
Co-authored-by: Anthony Towns <aj@erisian.com.au>
This is a backport of core#26521
Depends on D15790
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D15792