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.
Merge pull request #6 from caedesvvv/master

Bugfixes and tests for bip32
Merge pull request #4 from shesek/fix-compressed-signature

Fix signing with compressed keys