rpc: treat univalue type check error as RPC_TYPE_ERROR, not RPC_MISC_ERROR
Summary:
Throw a custom exception from Univalue::checkType (instead of a plain std::runtime_error) and catch it on the RPC server request handler. So we properly return RPC_TYPE_ERROR (-3) on every arg type error and not the general RPC_MISC_ERROR (-1). This will allow us to remove all the RPCTypeCheckArgument calls. As them are redundant since #25629.
Backport of core#25737.
Depends on D16289.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D16290