[lib] Introduce entity-helpers.js to help resolve ThreadInfo into ResolvedThreadInfo
Summary:
In a following diff, I'll update ThreadInfo.uiName to be string | $ReadOnlyArray<UserEntity>. At that point, this new ResolvedThreadInfo type will be differentiated from ThreadInfo. But at this this point, it is a straight copy-paste.
This diff introduces helpful utilities for resolving ThreadInfo into ResolvedThreadInfo, and a first use case, which is in calendar-selectors.js.
This diff has to come before I change the types, otherwise Flow would report errors.
Depends on D6590
Test Plan:
Here is FilterPanel, which is now able to resolve ENS names:
Reviewers: atul, inka
Reviewed By: atul
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D6591