Add CTxIndex::GetContainingBlock from Huntercoin.

Port over a refactoring from Huntercoin that replaces
GetDepthInMainChain by functions to also get the height directly.
Also cache full txPrev in CTxIn.

Store a copy of the previous tx in CTxIn when we have loaded it from
disk already.
Use cached CTxIn::txPrev for CreateNewBlock.

Don't load the prev tx in CreateNewBlock when we have a cached one.
Still accesses the disk for GetDepthInMainChain.
Cache also prevout height for CreateNewBlock.

Add prevHeight to CTxIn in-memory cache.  This should help to further
speed up CreateNewBlock.
Allow to disable the new txprev cache with "-notxprevcache".
Add settxprevcache RPC command.

The new settxprevcache RPC command can be used to enable and disable the
txprev cache during runtime.  When disabling it, all cached entries from
the mempool will be cleared.
Merge pull request #158 from domob1812/cache-priority

Add more aggressive caching of previous txouts in CTxIn.