[lib] Update convertClientDBThreadInfoToRawThreadInfo to validate MemberInfos
Summary:
Based on what we found while testing D10297, it's critical that we ensure that we validate the stringified JSON that we retrieve from ClientDBThreadInfo. Specifically, it's possible for ClientDBThreadInfo to have either stringified MinimallyEncodedMemberInfo or LegacyEncodedMemberInfo stored in the .members field, and we should A. validate that the data is correctly formed B. determine which format the data is in.
This diff is a proof-of-concept for how can also handle things for roles and currentUser.
Depends on D10297
Test Plan: Will be tested along with changes in D10297
Reviewers: ashoat, ginsu, tomek, rohan
Reviewed By: ashoat
Differential Revision: https://phab.comm.dev/D10298