Optimize InsertBlock with cached tx hashes.

This commit optimizes InsertBlock slightly by using the cached transaction
hashes instead of recomputing them.  Also, while here, use the
ShaHash.IsEqual function to do comparisons for consistency.

This is ongoing work towards conformal/btcd#25.

ok @drahn.