Fix -Wshadow warnings
Summary: These warnings have been introduced in D4891.
Test Plan:
With GCC (for some reason clang -tested with 9.0.1- doesn't report the
warning):
cmake -GNinja .. -DCMAKE_CXX_FLAGS="-Werror=shadow" ninja check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D4919