This will allow for the scheduler to be destructed even for tests that
only use the `BasicTestingSetup`. This fixes a TSAN lock order inversion
issue when running the `reverselock_tests` and the `scheduler_tests`
together.
Extracted from core [[https://github.com/bitcoin/bitcoin/pull/18571 | PR18571]].