[avalanche] Add a facility to check if avalanche is enabled
Summary:
This makes the code slightly better, but also makes it possible to
easily migrate away from gArgs or add other checks as needed.
Depends on D9647.
Ref T1611.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Maniphest Tasks: T1611
Differential Revision: https://reviews.bitcoinabc.org/D9648