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
Merge pull request #3178

f914c7a rpcwallet: use EnsureWalletIsUnlocked() where possible (Philip Kaufmann)