Script: fix warnings in Evaluator.hs

Fixes #69
Script: implement suggestions of hdevtools

Style fixes and redundant braces mostly, some small logic changes in
OP_CHECKMULTISIG
Script Tests: remove unused imports
Script Tests: fix most warnings

TODO move repl stuff
Merge pull request #70 from OttoAllmendinger/fix-warnings

Fix warnings
Fix of PayToSH logic in Evaluator.hs

A couple of bugs in the p2sh logic.
- Added more checking on whether the redeemScript should be evaluated
  (no empty stack, scriptPubKey had success)
- Changed the starting program state to be what is required ( need the scriptSig
  stack minus the redeemScript, and hashOps needs to be the redeemScript)
Merge pull request #71 from lornap/p2sh_bugfix

Fix of PayToSH logic in Evaluator.hs
Complete rewrite of JSON-RPC
Adding the id to parseRequest and parseResponse
Merge pull request #1 from plaprade/stratum-types

Adding the id to parseRequest and parseResponse
Reinstated invalid tests, and fixed bugs
Merge pull request #72 from xenog/stratum-types

Complete rewrite of JSON-RPC
Changed names of Stratum functions to avoid namespace clashes
Merge pull request #73 from xenog/stratum-namespace

Changed names of Stratum functions to avoid namespace clashes
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