The functions rest_mempool_info and rest_mempool_contents are similar, the only difference between them is:
rest_mempool_info uses MempoolInfoToJSON to get the mempool informations and rest_mempool_contents uses MempoolToJSON, for this reason this PR creates a new function to handle it and reduce duplicated code.
Also,
- Rename
strURIParttostr_uri_part. - Rename
strJSONtostr_json.