[native] Introduce constructThreadTraversalNodes(...)
Summary:
This function constructs an array of root ThreadTraversalNodes that will be consumed in updateRolesAndPermissions.
Note that these nodes JUST contain threadIDs and children and will be used for traversing the thread hierarchy. We will use these IDs to index into ThreadStoreThreadInfos (which is a map of threadID => rawThreadInfo). Considered different approaches, but this seemed the cleanest.
I introduced a bare bones updateRolesAndPermissions so this function isn't "dangling" and consume the bare bones updateRolesAndPermissions function in migration 38.
Depends on D7590
Test Plan:
Produces tree of ThreadTraversalNodes:
Unit tests added later in the stack
Reviewers: ginsu, ashoat
Reviewed By: ashoat
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D7600