<!-- Describe the issue -->

When our chainstate activation sequence fails and we're running the GUI, we ask the user via a question box whether or not they'd like to re-run the sequence with `fReindex = true`. Fun fact: despite the fact that this sequence is wrapped in a while loop, we only run it twice at most.

https://github.com/bitcoin/bitcoin/blob/7ecb309c4ed1bb9ae6b9a12cbb4f083328edc125/src/init.cpp#L1539-L1556

If they answer yes, the sequence will always fail, because a chainstate will have already been initialized in the original run and `InitializeChainstate` will throw a `std::logic_error`:

https://github.com/bitcoin/bitcoin/blob/7ecb309c4ed1bb9ae6b9a12cbb4f083328edc125/src/validation.cpp#L4573-L4594

This always reproduces. To reproduce:
```
gdb ./src/qt/bitcoin-qt
(gdb) b InitializeChainstate
(gdb) # add breakpoint for the "if (!fLoaded && !ShutdownRequested()) {" line
(gdb) r  # should stop at the breakpoint for InitializeChainstate
(gdb) c  # to advance to the breakpoint for the "if (!fLoaded && !ShutdownRequested()) {" line
(gdb) set fLoaded=false
(gdb) c  # should stop at the breakpoint for InitializeChainstate
(gdb) n  # step through InitializeChainstate to see that it throws
```

We expect the re-run of the chainstate activation sequence to not always fail.

* In order to efficiently track invalidity of headers, we keep the set of
     * blocks which we tried to connect and found to be invalid here (ie which
     * were set to BLOCK_FAILED_VALID since the last restart). We can then
     * walk this set and check if a new header is a descendant of something in
     * this set, preventing us from having to walk m_block_index when we try
     * to connect a bad block and fail.
     *
     * While this is more complicated than marking everything which descends
     * from an invalid block as invalid at the time we discover it to be
     * invalid, doing so would require walking all of m_block_index to find all
     * descendants. Since this case should be very rare, keeping track of all
     * BLOCK_FAILED_VALID blocks in a set should be just fine and work just as
     * well.
     *
     * Because we already walk m_block_index in height-order at startup, we go
     * ahead and mark descendants of invalid blocks as FAILED_CHILD at that time,
     * instead of putting things in this set.
     */
    std::set<CBlockIndex*> m_failed_blocks;
    
    CBlockIndex* m_best_header = nullptr;
    
    
    int64_t m_total_coinstip_cache{0};
    
    
    
    int64_t m_total_coinsdb_cache{0};