Replace loop with array lookup in TranslateMetadata::get

TranslateMetadata::get is called at least once for each message
group during ApiQueryMessageGroups with priority props.

Profiling on my local wiki which has about 1000 message groups:

ms/call  kb/call
0.98     0.87     ApiQueryMessageGroups::formatGroup-priority
0.01     0.89     ApiQueryMessageGroups::formatGroup-priority (new)
2208.07 16301.88  API:messagegroupsbefore
1078.48 16319.99  API:messagegroupsbefore (new)

https://mingle.corp.wikimedia.org/projects/internationalization/cards/3854

Bug: 53748
Change-Id: I6244b0d92c554b5121f20441da9cf81d5414e239
Merge "Replace loop with array lookup in TranslateMetadata::get"