Changes from boost::chrono to std::chrono, boost::condition_var to
std::condition_var, boost::mutex to sync.h Mutex, and reverselock.h to
sync.h REVERSE_LOCK. Also adds threadsafety annotations to CScheduler
members.
This is a partial backport of Core PR18234 : https://github.com/bitcoin/bitcoin/pull/18234/commits/d0ebd93270758ea97ea956b8821e17a2d001ea94
Depends on D6532