refactor: Add path argument to FindSnapshotChainstateDir
Summary:
Remove access to the global gArgs for getting the directory in
utxo_snapshot.
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/8789b11114b4bd6c7ee727dffbc75a6bdf20dd27
Depends on D18685
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18686