Fix signing with compressed keys

calcPubkeyRecoveryParam always assumed a non-compressed key, and was comparing
the address generated from a non-compressed public key against the original
address generated from the compressed public key.