change recommendation to deterministic k
fix possible infinite loop problem.

In order to distinguish between random k and deterministic k, I had at a
previous point created a loop which in standard ECDSA would generate k
randomly, but here does not generate it randomly. This led to a possible
infinite loop where if r or s were invalid, the loop would continue forever.
This commit fixes this by picking a random value of k in such cases (which are
rare), but this is technically incorrect since it is incompatible with
determinstic k. I may need to rethink how I distinguish between random k and
deterministic k to resolve this issue correctly.
test names shouldn't have parentheses
support bip 62 low s; add test vector

I wanted to complete the BitcoinJS test vector which ensures the value of r and
s are computed exactly correclty. However, BitcoinJS was computing signatures
using the BIP 62 low s rule. BIP 62 is designed to reduce transaction
malleability, so signatures should be produced according to this form, and at
some point in the future signatures not conforming to BIP 62 will be regarded
as invalid, which will cure transaction malleability. Since the BitcoinJS test
vector depended on the BIP 62 low s value, I had to add support for BIP 62 low
s to ECDSA to compute the same s value as BitcoinJS. Further, I had to change
the tests for sig2pubkey which were depending on computing the high s value.
Now both low and high s values are tested with sig2pubkey.

Reference:
* https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#Low_S_values_in_signatures