Move common package version code to init/common
Summary:
This concludes backport of core#21732
https://github.com/bitcoin/bitcoin/pull/21732/commits/615965cfd1ef1e0627d69970d99bdfedb9176833
Depends on D12563
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12564