Avoid spurious boost output in scheduler_tests
Summary:
Boost test macros try to output some message, which leads to a messy
debug output when called in intricated threads.
Use assert in these cases solves the issue.
Backport of Core PR14069
https://github.com/bitcoin/bitcoin/pull/14069/files
Test Plan:
./src/test/test_bitcoin -t scheduler_tests
Without the patch it will sometime output partial boost debug info.
With the patch the output will remain clean.
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D3232