tests: Don't make any wallets unless wallet is required
Summary:
This is a partial backport of core#20627 and core#26480
https://github.com/bitcoin/bitcoin/pull/20267/commits/3641597d7ef6f5097a9e93cab3ef7e0f9c820296i
https://github.com/bitcoin/bitcoin/pull/20267/commits/4de23824b0c711ece68f9fc007ffac12126710aa
https://github.com/bitcoin/bitcoin/pull/20267/commits/4d03ef9a73ceb5ef4e9d184a135bca6bdeb8c311
https://github.com/bitcoin/bitcoin/pull/26480/commits/fa68937b89aa5b10b33b3f5146390cd7ad369ff7
https://github.com/bitcoin/bitcoin/pull/20267/commits/6f36242389bd3e7eacf594ce90491e8ccca70f3a (partial, move the self.config definition to parse_args so we can use it via self.is_wallet_compiled() in set_test_params)
Test Plan: ninja check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17904