refactor: test/bench: dedup SetupDummyInputs()
Summary:
The only difference between SetupDummyInputs() in test/transaction_tests.cpp
and the one in bench/ccoins_caching.cpp was the nValue amounts of the outputs,
so we allow to pass those in an extra (fixed-size) array parameter.
This is a backport of Core PR18173
Test Plan: ninja && ninja check && src/bench/bitcoin-bench -filter=CCoins.*
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D8773