Make GetAvailableCredit run GetHash() only once per transaction.

This makes the first getbalance/getinfo 63x faster on my wallet.
Merge pull request #3973

a60ab0b Make GetAvailableCredit run GetHash() only once per transaction. (Gregory Maxwell)