Remove pointer cast in CRPCTable::dumpArgMap
Summary:
CRPCTable::dumpArgMap currently works by casting RPC command unique_id integer field to a function pointer, and then calling the function. The unique_id field wasn't supposed to be used this way (it's meant to be used to detect RPC aliases), and this code segfaults in the rpc_help.py test in multiprocess PR core#10102 because wallet RPC functions aren't directly accessible from the node process.
Fix this by adding a new GET_ARGS request mode to retrieve argument information similar to the way the GET_HELP mode retrieves help information.
This is a backport of core#21035 [3/3]
https://github.com/bitcoin/bitcoin/pull/21035/commits/9048c58e10841d9e1d709c0a325dd14684cec325
Depends on D10765
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10766