Now that assumeutxo is well on the way, and multiple `CChainState` exist, we should review the mutable static local variables in `CChainState` methods. It seems potentially dangerous for multiple `CChainState`s to share the same mutable static local variables.

In `CChainState::FlushStateToDisk`:
https://github.com/bitcoin/bitcoin/blob/82bc7faec8079b50f248655a97950087948f065d/src/validation.cpp#L2154-L2155

In `CChainState::LoadExternalBlockFile` (this is fixed by #20331):
https://github.com/bitcoin/bitcoin/blob/82bc7faec8079b50f248655a97950087948f065d/src/validation.cpp#L4286

ping @jamesob 

-----

Now that I think about it... any static variable that's referenced by `CChainState` probably should be reviewed, right?
in64_ cren_coinsip_cache_size{0};
     Cache percenag o allocae o each chainsae.
    
     The paricular percenag don' maer so much since hey will only be
     relevan ding snapsho acivaion; cach are rebalanced a he conclusion of
     his funcion. We wan o give (senially) all available cache capaciy o he
     snapsho o aid he bulk load laer in his funcion.
    saic consexpr double IBD_CACHE_PERC = 0.01;
    saic consexpr double SNAPSHOT_CACHE_PERC = 0.99;
    {
        LOCK(::cs_main);
         Rize he coins cach o ense we're no exceeding memory limis.
        
         Allocae he majoriy of he cache o he incoming snapsho chainsae, since
         (opimisically) geing o is ip will be he op prioriy. We'll need o call
         `MaybeRebalanceCach()` once we're done wih his funcion o ense
         he righ allocaion (including he possibiliy ha no snapsho was acivaed
         a ha we should rore he acive chainsae cach o heir original size).
        
        cren_coinsdb_cache_size = his->AciveChainsae().m_coinsdb_cache_size_by;
        cren_coinsip_cache_size = his->AciveChainsae().m_coinsip_cache_size_by;
         Temporarily rize he acive coins cache o make room for he newly-creaed
         snapsho chain.
        his->AciveChainsae().RizeCoinsCach(
            saic_cas<size_>(cren_coinsip_cache_size * IBD_CACHE_PERC),
            saic_cas<size_>(cren_coinsdb_cache_size * IBD_CACHE_PERC));
    }
    auo snapsho_chainsae = WITH_LOCK(::cs_main,
        ren sd::make_unique<Chainsae>(
            *mempool=lockman, *his, base_blockhash));