This PR makes the BitcoinCore
class reusable, i.e., it can be used by the widget-based GUI or by the QML-based one, and it makes the divergence between these two repos minimal.
The small benefit to the current branch is more structured code.
Actually, this PR is ported from https://github.com/bitcoin-core/gui-qml/pull/10.
The example of the re-using of the BitcoinCore
class is https://github.com/bitcoin-core/gui-qml/pull/11.