Signature's S, when over half order, has to be encoded differently

Reference implementation: https://github.com/bitcoin/bitcoin/blob/b7bba43a14a641b6b64bbf48357b2987c1b05800/src/key.cpp#L235-L238

ht @oleganza

Thoughts?
Yeah, that's cool. But in order to optionally comply with stricter verification we need to generate canonical signatures in the first place. BitcoinQT does it [1] and requires such signatures when using its API [2], CoreBitcoin does it [3], Bitcore does it [4], BIP 62 proposes enforcing it for all transactions [5]. It is really expected that a modern library produces the most canonical signatures and scripts as possible to be a good citizen in present and future. 

Also, sorry, P2SH seems to *not* require strict encoding yet. My mistake!

1. https://github.com/bitcoin/bitcoin/blob/b7bba43a14a641b6b64bbf48357b2987c1b05800/src/key.cpp#L235
2. https://github.com/bitcoin/bitcoin/blob/c0e9548b6305d315735ecd6dacc3c88acd6a6c7a/src/rpcrawtransaction.cpp#L688 and https://github.com/bitcoin/bitcoin/blob/c0e9548b6305d315735ecd6dacc3c88acd6a6c7a/src/script.h#L220
3. https://github.com/oleganza/CoreBitcoin/blob/0215638ef8f2df01f67f72f002501ab144206fe0/CoreBitcoin/BTCKey.m#L128
4. https://github.com/bitpay/bitcore/blob/cd353ac02e76fb3294c40366d8d5dc04ce1939d7/lib/common/Key.js#L95
5. https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki