optimize sequel store wrap_block

Currently wrap_block will call amount of sql queries proportional to amount of transactions in the block, which is pretty painful. With this, all inputs and outputs are fetched with single queries, which seems to speed up consistency check 5-6 times.