Stricter ecdsa RFC 6979 adherence

This pull request changes `deterministicGenerateK` to strictly adhere to the RFC rather than just step around the edge cases.

Namely it avoids the following flaw in the current implementation (we were not looping):
> Please note that when k is generated from T, the result of bits2int is compared to q, not reduced modulo q. If the value is not between 1 and q-1, the process loops. 
> Performing a simple modular reduction would induce biases that would be detrimental to signature security.

This is not a critical security update, no security advisory is necessary.
Probability of bias is close to 1 in 2^128 and was known previously.