Cleanup refactoring of coins/mempool

This pull request should have no functional effects.
 * The first commit removes the CBlockIndex dependency of CCoinsView, making it reason in terms of block hashes (which it was doing under the hood anyway).
 * The second commit moves most CCoins/CCoinsView related logic to coins.{h,cpp}, and the rest to txmempool.{h,cpp}. This removes the need for the LookupFromTip loophole, as txmempool is just built on top of coins.