Make GetAvailableCredit run GetHash() only once per transaction.
Make GetAvailableCredit run GetHash() only once per transaction.

This makes the first getbalance/getinfo 63x faster on my wallet.

(cherry picked from commit bitcoin/bitcoin@a60ab0ba89289433563c4c0993904acbca8c99ff)

coinkeeper/2015-06-22_18-37_dogecoin,Domer85/dogecoin,coinwarp/dogecoin,masterbraz/dg,haisee/dogecoin,Domer85/dogecoin,koharjidan/dogecoin,brishtiteveja/sherlockcoin,marklai9999/Taiwancoin,Domer85/dogecoin,haisee/dogecoin,coinkeeper/2015-06-22_18-37_dogecoin,coinwarp/dogecoin,marklai9999/Taiwancoin,coinwarp/dogecoin,Domer85/dogecoin,masterbraz/dg,masterbraz/dg,coinkeeper/2015-06-22_18-37_dogecoin,Exceltior/dogecoin,koharjidan/dogecoin,koharjidan/dogecoin,brishtiteveja/sherlockcoin,Exceltior/dogecoin,masterbraz/dg,langerhans/dogecoin,langerhans/dogecoin,haisee/dogecoin,langerhans/dogecoin,Exceltior/dogecoin,jarymoth/dogecoin,brishtiteveja/sherlockcoin,marklai9999/Taiwancoin,coinkeeper/2015-06-22_18-37_dogecoin,coinwarp/dogecoin,jarymoth/dogecoin,Exceltior/dogecoin,coinwarp/dogecoin,langerhans/dogecoin,koharjidan/dogecoin,coinkeeper/2015-06-22_18-37_dogecoin,haisee/dogecoin,langerhans/dogecoin,masterbraz/dg,brishtiteveja/sherlockcoin,brishtiteveja/sherlockcoin,marklai9999/Taiwancoin,jarymoth/dogecoin,jarymoth/dogecoin,koharjidan/dogecoin,koharjidan/dogecoin,jarymoth/dogecoin,haisee/dogecoin,langerhans/dogecoin,Exceltior/dogecoin