refactor: Pass NodeContext to RPC and REST methods through util::Ref
Summary:
This commit does not change behavior
Partial backport of core PR18740:
https://github.com/bitcoin/bitcoin/pull/18740/commits/6fca33b2edc09ed62dab2323c780b31585de1750#diff-2ae094f9329ce9498e1b4a9cb7767945b54a33b4ee9fed4f0ba401a98e1683c1
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, jasonbcox, deadalnix
Reviewed By: #bitcoin_abc, jasonbcox, deadalnix
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D7990