cli: fix -getinfo output when compiled with no wallet
Summary:
Remove null wallet related fields in the output of -getinfo when compiled with no wallet.
This is a backport of Core PR17368
Test Plan:
cmake .. -GNinja -DBUILD_BITCOIN_WALLET=OFF ninja src/bitcoind
src/bitcoin-cli -getinfo
The ouput does not show wallet specific fields, such as walletversion, balance, etc
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D8258