rpc: Actually throw help when passed invalid number of params
Summary:
- rpc: Add RPCHelpMan::IsValidNumArgs()
This is a backport of Core PR15401
Depends on D6064
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: majcosta
Differential Revision: https://reviews.bitcoinabc.org/D6220