Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const
Summary: This is a backport of core#20581
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D11094