Add support for unlocked / unencrypted wallets

Before we would unconditionally ask for the passphrase before
loading privkeys. Now we check if the wallet is unlocked first,
and don't bother. (This also enables use with unencrypted wallets.)