most significant bit encoding

When executing a bitcoin script, the values on the stack are to be interpreted
as little endian numbers encoded in sign+magnitude. That is, they are little
endian, and the most significant bit determines the sign. If the most
significant bit is 0, the number is positive. If the most significant bit is 1,
the number is negative. This commit adds support to input/output big numbers in
this format so they can be used a script interpreter.