Add code to produce and verify compact signatures.

The format used is identical to that used in bitcoind.