Move scheduler/threadGroup into common-init instead of per-app
Summary:
This resolves #12229 which pointed out a shutdown deadlock due to
scheduler/checkqueue having been shut down while network message
processing is still running.
Backport of Core PR 12266
T507
Test Plan:
The bug this fixes is difficult to reproduce, so I did the following to verify that nothing is obviously broken:
test_runner.py passes
bitcoin-qt validating that it starts, can be used normally, and shuts down without issue.
Reviewers: deadalnix, Fabien, #bitcoin_abc
Reviewed By: deadalnix, #bitcoin_abc
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2260