Decouple CChain from mapBlockIndex
Move CBlockIndex, CChain and related code out of main
Merge pull request #4796

e8b5f0d Move CBlockIndex, CChain and related code out of main (jtimon)
6db83db Decouple CChain from mapBlockIndex (jtimon)
fix a possible memory leak in CWalletDB::Recover
fix possible memory leaks in CWallet::EncryptWallet