Fix unwanted transaction de-prioritization

Calculate both inputs and outputs of a transaction based on the transaction's reference height, as opposed to the current block height, which was previously being used for the inputs. This was resulting in smaller (or even negative) fees for the purposes of priority calculation, thereby resulting in transactions that had trouble getting on the block chain.