Some cleanup of the code.

This patch simplifies various routines that access(ed) the tx index or transaction on disk, where it was possible.  A noteable improvement is also that priority calculation in `CreateNewBlock` is now done using the UTXO set instead of loading previous transactions from disk (this is what caused (part of) the recent performance problems for Namecoin miners during the "Great Aggregation").

Please test carefully (especially miners), but I do not see any really critical changes made here.