Explicitly ensure that wallet is unlocked in `importprivkey`

This makes for a more useful error reply (fixes #957).
Merge pull request #3457

d78f35a Explicitly ensure that wallet is unlocked in `importprivkey` (Wladimir J. van der Laan)