According to #3440 it would make sense to decouple the wallet and the miner (and maybe other things) from the init-/shutdown-process, etc.
This is related to #5686, #5744, #5745
If this gets merged, my plans are to first transform the miner into a module, then the wallet.
The goal should be to remove the ENABLE_WALLET
ifdefs and make use of the modular concept.
If this looks to useless, i can transform the internal miner into a module within this PR (but it will be a harder review).