[backport#17447] wallet: Make -walletdir network only
[backport#17447] wallet: Make -walletdir network only

Summary:
3c2c439dcd8797019ac6d6614775d5c20ee41c36 wallet: Make -walletdir network only (João Barbosa)

Pull request description:

  With this PR `bitcoind -regtest` doesn't run if bitcoin.conf has
  ```
  walletdir=/mnt/mydisk/wallets
  ```
  But works with
  ```
  [regtest]
  walletdir=/mnt/mydisk/wallets
  ```

  Doesn't change mainnet behavior.

  Closes #15630.

---

Backport of Core [[https://github.com/bitcoin/bitcoin/pull/17447 | PR17447]]

Test Plan:
  ninja all check check-functional

perform test in the summary

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7713

Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc