Always flush block and undo when switching to new file
Always flush block and undo when switching to new file

Previously, the undo weren't being flushed during a reindex because
fKnown was set to true in FindBlockPos. That is the correct behaviour
for block files as they aren't being touched, but undo files are
touched.

This changes the behaviour to always flush when switching to a new file
(even for block files, though that isn't really necessary).

Rebased-From: 22e780737db57bcb18b3824eb8158e19a4775cb6
Github-Pull: #6948

arruah/ensocoin,SartoNess/BitcoinUnlimited,CTRoundTable/Encrypted.Cash,marlengit/hardfork_prototype_1_mvf-bu,argentumproject/argentum,marlengit/hardfork_prototype_1_mvf-bu,NateBrune/bitcoin-fio,loxal/zcash,myriadteam/myriadcoin,arruah/ensocoin,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Bitcoin-com/BUcash,BTCfork/hardfork_prototype_1_mvf-bu,marcusdiaz/BitcoinUnlimited,vericoin/vericoin-core,nathan-at-least/zcash,Justaphf/BitcoinUnlimited,NateBrune/bitcoin-nate,NateBrune/bitcoin-fio,marcusdiaz/BitcoinUnlimited,Bitcoin-com/BUcash,marlengit/hardfork_prototype_1_mvf-bu,Bitcoin-com/BUcash,marlengit/BitcoinUnlimited,nathan-at-least/zcash,cddjr/BitcoinUnlimited,zetacoin/zetacoin,bitcoinsSG/zcash,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,AllanDoensen/BitcoinUnlimited,vericoin/vericoin-core,Justaphf/BitcoinUnlimited,marlengit/hardfork_prototype_1_mvf-bu,marlengit/BitcoinUnlimited,NateBrune/bitcoin-fio,Bitcoin-com/BUcash,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,argentumproject/argentum,SartoNess/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,CTRoundTable/Encrypted.Cash,krzysztofwos/BitcoinUnlimited,marcusdiaz/BitcoinUnlimited,argentumproject/argentum,aniemerg/zcash,bitcoinsSG/zcash,cddjr/BitcoinUnlimited,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,loxal/zcash,arruah/ensocoin,krzysztofwos/BitcoinUnlimited,argentumproject/argentum,Justaphf/BitcoinUnlimited,vericoin/vericoin-core,argentumproject/argentum,myriadteam/myriadcoin,loxal/zcash,nathan-at-least/zcash,NateBrune/bitcoin-nate,myriadcoin/myriadcoin,NateBrune/bitcoin-fio,cddjr/BitcoinUnlimited,krzysztofwos/BitcoinUnlimited,bitcoinsSG/zcash,SartoNess/BitcoinUnlimited,arruah/ensocoin,nathan-at-least/zcash,aniemerg/zcash,CTRoundTable/Encrypted.Cash,NateBrune/bitcoin-nate,BitcoinUnlimited/BitcoinUnlimited,CTRoundTable/Encrypted.Cash,marlengit/BitcoinUnlimited,AllanDoensen/BitcoinUnlimited,argentumproject/argentum,argentumproject/argentum,cddjr/BitcoinUnlimited,vericoin/vericoin-core,loxal/zcash,marcusdiaz/BitcoinUnlimited,BTCfork/hardfork_prototype_1_mvf-bu,BTCfork/hardfork_prototype_1_mvf-bu,myriadteam/myriadcoin,marcusdiaz/BitcoinUnlimited,AllanDoensen/BitcoinUnlimited,nathan-at-least/zcash,aniemerg/zcash,AllanDoensen/BitcoinUnlimited,krzysztofwos/BitcoinUnlimited,NateBrune/bitcoin-fio,arruah/ensocoin,vericoin/vericoin-core,zetacoin/zetacoin,myriadteam/myriadcoin,BTCfork/hardfork_prototype_1_mvf-bu,Justaphf/BitcoinUnlimited,nathan-at-least/zcash,SartoNess/BitcoinUnlimited,AllanDoensen/BitcoinUnlimited,myriadcoin/myriadcoin,NateBrune/bitcoin-nate,arruah/ensocoin,BitcoinUnlimited/BitcoinUnlimited,CTRoundTable/Encrypted.Cash,marlengit/BitcoinUnlimited,krzysztofwos/BitcoinUnlimited,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,marlengit/BitcoinUnlimited,aniemerg/zcash,loxal/zcash,SartoNess/BitcoinUnlimited,bitcoinsSG/zcash,marlengit/hardfork_prototype_1_mvf-bu,BitcoinUnlimited/BitcoinUnlimited,cddjr/BitcoinUnlimited,BTCfork/hardfork_prototype_1_mvf-bu,zetacoin/zetacoin,aniemerg/zcash,myriadcoin/myriadcoin,bitcoinsSG/zcash,myriadcoin/myriadcoin,NateBrune/bitcoin-nate,marcusdiaz/BitcoinUnlimited,myriadcoin/myriadcoin,BTCfork/hardfork_prototype_1_mvf-bu,myriadcoin/myriadcoin,bitcoinsSG/zcash,SartoNess/BitcoinUnlimited,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,SartoNess/BitcoinUnlimited,Justaphf/BitcoinUnlimited,loxal/zcash,myriadteam/myriadcoin,NateBrune/bitcoin-fio,AllanDoensen/BitcoinUnlimited,NateBrune/bitcoin-nate,CTRoundTable/Encrypted.Cash,aniemerg/zcash,marlengit/hardfork_prototype_1_mvf-bu,myriadteam/myriadcoin,zetacoin/zetacoin,Bitcoin-com/BUcash,krzysztofwos/BitcoinUnlimited,vericoin/vericoin-core,Bitcoin-com/BUcash,marlengit/BitcoinUnlimited,zetacoin/zetacoin,zetacoin/zetacoin,cddjr/BitcoinUnlimited,Justaphf/BitcoinUnlimited