Index the folder tree once per library build

Each folder card rescanned every folder and strategy to find its subtree,
twice, and counted its child folders by scanning every folder again. The
library root of a big library paid that once per folder card on every
rebuild. Build a parent-to-children index once per build and read each
card's subtree from it. Cloud folder cards count child folders from one
pass over the tree too.

compareFoldersForSort had no callers left (sortLibraryFolders sorts on the
precomputed lastUpdated), so it goes with the scans it used.
1625ddcd1cDara Adedeji committed on 10/21/2026, 11:47:47 PMparent811c2d2

Checks

Some checks failed
2 files changedLine totals unavailable