Refactor metadata_map with flattened key/value pair (#61731)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61731
In the previous diff, metadata_map contains mobile_info.json and producer_info.json. We need to parse json each time when we log the required information. This diff helps to flatten the content in the files into key/value pair. It allows logger to directly loop through the metadata_map and log the information.
Test Plan:
Since 3D Photo is disabled for current FB app, testings are only performed on CC scanner.
# Test On CC Scanner
**Test content with LOG(WARNING)**
{P429123273}
**Scuba Logger Output**
1. MOBILE_MODULE_LOAD_STATS
{F631884673}
2. MOBILE_MODULE_STATS
{F631884787}
Reviewed By: xcheng16
Differential Revision: D29690702
fbshipit-source-id: 1db5a1f5c25e98e5b2f1cc254fd880dfdfa025e2