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.

This commit fixes it by passing the entire pubkey object, and configuring the
generated address to use the same compressed setting as the original one.