add cast_to_bool and fix edge case with cast_to_bignum

  thanks to andytoshi (https://github.com/apoelstra/rust-bitcoin)

    `integers and bools are not parsed correctly: for bools, a vector of any size which is all-zeros *or* all-zeros-except-lsb-is-0x80 is "false" while anything else is "true". The 0x80 thing is so that signed-magnitude "negative zero" will still be false.`

    `For integers, anything in excess of 4 bytes is illegal to read and fails the script. (Note that you can use the arithmetic opcodes to *push* numbers in excess of 4 bytes onto the stack; this is fine, you just can't read them as integers.) Representation is up-to-4-bytes signed-magnitude little-endian, so the range of readable integers is -(2^31-1) to (2^31-1).`