Duplicate key checks in UniValue are expensive and dramatically
impact various serialization steps in the RPC code. A small modification to the
UniValue library gives a significant performance boost without taking on
large ownership of the library.
This patch includes the updates to UniValue as well as a proof-of-concept
modification of MempoolToJSON(). Future diffs will tackle other critical
areas such as getblocktemplate and getblock.
Inspired by https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node/-/merge_requests/122
Depends on D5974