util: make GetDataDir read-only & create datadir only in bitcoind and bitcoin-qt
Summary:
Currently ArgsManager::GetDataDir() ensures it will always return a datadir by creating one if necessary. The function is shared between bitcoind bitcoin-qt and bitcoin-cli which results in the undesirable behaviour described in core#20070.
This PR splits out the part of the function which creates directories and adds it as a standalone function, only called as part of bitcoind and bitcoin-qt init, but not bitcoin-cli.
This changes behaviour of GetConfigFilePath which now always returns the
absolute path of the provided -conf argument.
This is a backport of core#27073
Depends on D16192
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D16193