Fix unecessary copies in rpcwallet.cpp
Summary: The eroneous copies were added in D3949
Test Plan:
make
Check that warning are gone.
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D4427