When the mempool fills the verbose `getrawmempool` RPC call gets really slow.  It can take minutes for >100k transactions in the mempool.

The culprit is the univalue library.  Objects are implemented as a big list, but the library checks for duplicate keys.  So inserting n key-value pairs into an object takes O(n^2).

Possible fixes:

- Improve univalue library by using linked hash maps.
- change the RPC output format of getrawmempool to use a list of objects, instead of an object of objects.  But this breaks existing code.
- hack the library to be able to skip the duplicate check.

status = "headers-only";
        } else if (block->IsValid(BLOCK_VALID_SCRIPTS)) {
            
            status = "valid-fork";
        } else if (block->IsValid(BLOCK_VALID_TREE)) {
            
            status = "valid-headers";
        } else {
            
            status = "unknown";
        }
        obj.pushKV("status", status);
        res.push_back(obj);
    }
    return res;
}
UniValue MempoolInfoToJSON(const CTxMemPool& pool)
{
    UniValue ret(UniValue::VOBJ);
    ret.pushKV("size", (int64_t)pool.size());
    ret.pushKV("bytes", (int64_t)pool.GetTotalTxSize());
    ret.pushKV("usage", (int64_t)pool.DynamicMemoryUsage());
    size_t maxmempool = gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
    ret.pushKV("maxmempool", (int64_t) maxmempool);
    ret.pushKV("mempoolminfee", ValueFromAmount(std::max(pool.GetMinFee(maxmempool), ::minRelayTxFee).GetFeePerK()));
    ret.pushKV("minrelaytxfee", ValueFromAmount(::minRelayTxFee.GetFeePerK()));
    return ret;
}
static UniValue getmempoolinfo(const JSONRPCRequest& request)