Transaction: use the type embedded in the signature
crypto/ecdsa: moves HmacSHA256 to crypto
ecdsa: add serializeSigCompact and tests

This also adds tests for all other ECDSA serialize/parsing functions.
The k, r, s and D values were sourced from test vectors on
https://bitcointalk.org/index.php?topic=285142.40 .

The compact signatures (aka, i values) were generated from bitcoinjslib, but they
are straight forward anyway.
ec: add better test vectors for ECPointFp encode/decode

These test vectors were generated internally.
message: use serializeSigCompact
ec: getEncoded now uses Buffer API
ecdsa: parseSig now uses buffer API
ecdsa: parseSigCompact use Buffer API

parseSigCompact also now returns the correct recovert parameter without
the need to subtract the compression bit.
This makes it easier to use.
ec: decodeFrom now uses Buffers and handles errors
ec: extract THREE constant
ec: use signum() instead of equals(ZERO)
ecdsa: use shamirs trick properly
ecdsa: remove unnecessary function
ecdsa: consistent parameter ordering

The bias towards moving e out of the
funciontoinadfojdfpsoidjfadoifjdspiofjdas jdifjasdifpasdfsadufhasdif
THIS NEEDS TO BE EXPLAINED AND STUFF
ecdsa: prefer to use [r, s] values directly
ecdsa: improve BIP62 'low s value' inline comment
ecdsa: P_OVER_FOUR is a curve specific constant
ecdsa: extract BigInteger constants
ecdsa: use square() instead of x*x
ecdsa: clarify comment intention