Fix a memory leak and add a number of small tests.

This fixes a simple copy and paste induced memory leak for the ecdsa init.

The tests are mostly just improving coverage and aren't interesting.
Merge pull request #135

ee3eb4b Fix a memory leak and add a number of small tests. (Gregory Maxwell)