change Tx#signature_hash_for_input, Script#new and Script#check_callback api

  fixes OP_CODESEPARATOR and makes OP_CHECKSIG/check_callback simpler.
Tx#mutate to simulate tx malleability issue
no need to fetch block in prev_txs for SequelStore

in wrap_tx blk_id is assigned only if block is in the main chain
more prev_txs cleanup

* for UtxoStore blk_id is always a block on the main chain
* for sequel store it stays the same as it was
* dummy only seems to care about the main chain
* for other storesi (to come) we assume blk_id will always be a block in the main
chain, which seems fair given Tx model only keeps association with one
block
fetch existing tx ids when storing block in one query instead of N
do one query instead of N to fetch existing addr ids
use copy_into for postgres inserts where it's simple enough
use COPY to store addr and tx for postgres
use COPY for massive inserts with postgres + cleanup
node: fix #on_getblocks when requested blocks are beyond our chain head
fetch all prev_txs needed for validation with a single query
optimize finding spent outputs
naming is hard
typo + naming fix
cache tx binary hash

This gets called *a lot*. To my surprise there is actually measurable
improvement in block store time with this.
let's not recalculate hashes for objects fetched from db

We have check consistency for that.
Comparison "blk.hash == blk.recalc_block_hash" in consistency check
would even suggest that blk.hash is expected to be fetched from the db
fix some old typo preventing script cache
fix test failing on ruby 2.0

We are only adding @addr in before, so expectation wasn't matching for
newly generated key, I still have no idea why it wasn't failing on 1.9