Migrate the sync module to use the std-defined (since C++11) condition_variable, mutex and recursive_mutex instead of the boost provided ones.
Boost locking primitives are still used elsewhere in the project. This commit modifies just the sync module itself and the minimum code required to compile and work with its modified interface.
A couple of files were missing boost includes and previously indirectly included them through the sync.h header - added them.
Added TODO comment about changing a polling timeout in mining.cpp to use std::chrono::stable_clock which can’t go back in time due to OS changes instead of std::chrono::system_clock which can. Not making the actual fix in this commit to maintain max compatibility with previous behavior.
Resolves #11166