refactor: Remove gArgs access from validation.cpp
Summary:
This is done in the context of the libbitcoinkernel project, wherein
reliance of libbitcoinkernel code on the global gArgs is incrementally
removed.
This is a partial backport of core#27576
https://github.com/bitcoin/bitcoin/pull/27576/commits/05870b1c92f39d90e5ba6e0caf2f6c2b37955528
Depends on D18692
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18693