Move common global init code to init/common
Summary:
This is a partial backport of core#21732
https://github.com/bitcoin/bitcoin/pull/21732/commits/a67b54855b294802d52f09fa60d3f63550cbada7
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12559