Our new chat member list sidebar organizes the list of members in a chat by their role. This diff introduces a new hook that give a `threadInfo` will group all the members of that thread by their role and return an array of grouped role infos.
Thankfully rohan created `useRolesFromCommunityThreadInfo` which handles all the heavy lifting of figuring out the role info for each member in a thread. We can use that to group our members by their role, then sort the roles alphabetically by their role name and return them as an array of `GroupedRoleInfos` to be consumed later.
Linear task: https://linear.app/comm/issue/ENG-5977/group-each-member-in-the-community-by-role
Depends on D10900