Changing the der_encode_sig padding decision to avoid non-canonical sign...

...atures.

The negative number detection for R and S was flawed, sometimes creating non-canonical signatures where no padding was added to negative numbers, so I followed what was done here: https://code.google.com/p/bitcoinj/source/browse/core/src/main/java/com/google/bitcoin/crypto/TransactionSignature.java?r=354446dd40d7153ce5197e01c8a1ffe6b705bae3#94 which fixed the problem for me.