signrawtransaction: validate private key.

Github-Pull: #5461
Rebased-From: aa768f1848b00e0fd615016598d3fb1f1da240ed