refactoring: introduce ChainstateActive()
Summary:
To be used once we move global functions (e.g. FlushStateToDisk()) into
CChainState methods.
Thanks to Marco Falke for suggestions
This is a partial backport of Core PR15976 : https://github.com/bitcoin/bitcoin/pull/15976/commits/4d6688603b8c8df854d52df464e157d0a6e7bde6
Depends on D5996
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D6001