Transaction Checks Optimised

Addresses Bitcoin CVE-2013-2293. Stops fetching transaction inputs to
memory once a spent or invalid input detected.