This function constructs an array of root `ThreadTraversalNode`s that will be consumed in `updateRolesAndPermissions`.
Note that these nodes JUST contain `threadIDs` and `children`. 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