On master, the following queued connection
```
connect(this, &RPCConsole::cmdRequest, executor, &RPCExecutor::request);
```
uses a `const WalletModel*` parameter regardless whether the `ENABLE_WALLET` macro is defined.
Although this code works in Qt 5, it is flawed. On Qt 6, the code gets broken because the fully defined WalletModel type is required which is not the case if ENABLE_WALLET is undefined.
> Guard `RPCConsole::{add,remove}Wallet()` with `ENABLE_WALLET`
> Make `RPCExecutor*` a member of the `RPCConsole` class
> Do not pass `WalletModel*` to queued connection
This is a backport of core-gui#589
Depends on D18163