Decouple CCoins from CTxInUndo

Built on top of #5100