[backport#15638] [build] Move rpc utility methods to rpc/util
Summary:
Moves the following utility methods to rpc/util and moves that unit to
libbitcoin_common so they can be accessed by all libraries.
- RPCTypeCheck
- RPCTypeCheckArgument
- RPCTypeCheckObj
- AmountFromValue
- ParseHashVParseHashO
- ParseHexV
- ParseHexO
- HelpExampleCli
- HelpExampleRpc
https://github.com/bitcoin/bitcoin/pull/15638/commits/1acc61f8746bc6efb905e121a9f607c4f5982b35
Depends on D5967
This is a partial backport of Core PR15638
Test Plan:
ninja check check-functional
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5979