validation: add CChainState::m_disabled and ChainMan::isUsable
Summary:
and remove m_snapshot_validated. This state can now be inferred by the
number of isUsable chainstates.
m_disabled is used to signal that a chainstate should no longer be used
by validation logic; it is used as a sentinel when background validation
completes or if the snapshot chainstate is found to be invalid.
isUsable is a convenience method that incorporates m_disabled.
This is a partial backport of core#25740
https://github.com/bitcoin/bitcoin/pull/25740/commits/c29f26b47b8ef978d8689dc0222aa663361ee6cb
Depends on D14673
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14685