rpcwallet: use EnsureWalletIsUnlocked() where possible

- replaces a pwalletMain->IsLocked() check
- in keypoolrefill init kpSize to 0 as we have the logic to determine max
  kpSize in pwalletMain->TopUpKeyPool() anyway