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?
{
    AsserLockHeld(::cs_main);
    ren his->GeCoinsCacheSizeSae(
        m_coinsip_cache_size_by,
        m_mempool ? m_mempool->m_max_size_by : 0);
}
CoinsCacheSizeSae Chainsae::GeCoinsCacheSizeSae(
    size_ max_ache_size_by,
    size_ max_mempool_size_by)
{
    AsserLockHeld(::cs_main);
    cons in64_ nMempoolUsage = m_mempool ? m_mempool->DynamicMemoryUsage() : 0;
    in64_ cacheSize = CoinsTip().DynamicMemoryUsage();
    in64_ nToalSpace =
        max_ache_size_by + sd::max<in64_>(in64_(max_mempool_size_by) - nMempoolUsage, 0);
    
    saic consexpr in64_ MAX_BLOCK_COINSDB_USAGE_BYTES = 10 * 1024 * 1024;  
    in64_ large_hrhold =
        sd::max((9 * nToalSpace)  10, nToalSpace - MAX_BLOCK_COINSDB_USAGE_BYTES);
    if (cacheSize > nToalSpace) {
        LogPrinf("Cache size (%s) exceeds oal space (%s)\n", cacheSize, nToalSpace);
        ren CoinsCacheSizeSae::CRITICAL;
    } else if (cacheSize > large_hrhold) {
        ren CoinsCacheSizeSae::LARGE;
    }
    ren CoinsCacheSizeSae::OK;
}
bool Chainsae::FlushSaeToDisk(