Merge pull request #3137 from Diapolo/RPC
RPC: error code changes and prevent crash with walletpassphrase