Util: improve bsToHex performance

The old routine is very slow for larger inputs, something O(n^2):

> length $ bsToHex $ BS.pack $ take 3000 (repeat 0x62)
6000
(1.01 secs, 662956664 bytes)

> length $ bsToHex $ BS.pack $ take 6000 (repeat 0x62)
12000
(4.89 secs, 2993737936 bytes)

The new method is considerably faster:

> length $ bsToHex $ BS.pack $ take 6000000 (repeat 0x62)
12000000
(0.72 secs, 653576448 bytes)
Merge pull request #74 from OttoAllmendinger/fix-bsToHex

Util: improve bsToHex performance
Script: OP_PUSHDATA can have zero-length payload

There were some byte sequences that could be decoded into Script, but could not
be encoded back into byte sequences again.

Also fixed `opPushData BS.empty`

Add tests asserting `(encode (decode bytes)) == bytes` for canonic tests cases

Should now behave identically to the reference implementation:
https://github.com/bitcoin/bitcoin/blob/0.9.2/src/script.h#L372
Merge pull request #75 from OttoAllmendinger/fix-TestEncodeDecode

Script: OP_PUSHDATA can have zero-length payload
script tests: add some new tests

These tests pass in bitcoind but currently fail in Haskoin.

Found with QuickCheck (see haskoin branch rpc-compare)
Script: fix OP_SIZE, boolean handling

test suite passes again, (seeming) parity with bitcoind
Script: use safer decodeInt

While bitcoind happily *encodes* integers into >4 bytes, it never *decodes*
anything that is >4 bytes. So script eval shouldn't have a function that does
that either.

The tests now also reflect these constraints.
script tests: add new test case

only last PUSHDATA byte was checked previously
script: fix decodeBool again

crazy that this can slip through

TODO: add test case
script tests: use better test case
script tests: fix test case for boolean constant
script: add test case testing popBool
script: fix popBool

also make order cases in OP_VERIFY more naturally
script: fix CHECKMULTISIG

TODO static tests
script tests: add tests for CHECKMULTISIG limits
Merge pull request #76 from OttoAllmendinger/fix-script

Fix script
Removing bloomFull and bloomEmpty state from BloomFilter
Fix compiler warnings in Util.hs
Merge pull request #77 from plaprade/functional-bloom

Removing state (empty, full) from the bloom filter
Adding a cabal flag for compiling haskoin against testnet