By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Deduplicate the test-forest flatteners `flattenTestForestWithIds` and `flattenTestForestWithIdsAndCallStacks` were near-identical, differing only in what each leaf emits. Implement both in terms of a single internal `flattenTestForestWith` that takes a leaf projection `CallStack -> result -> a`, so the TestId-assignment logic has one source of truth.
| Time to Start | Worker time | Duration | Time to finish | |
| Config | 0s | 3s | 3s | 3s |
| Eval | 3s | 36s | 36s | 40s |
| Build | 10s | 16m00s | 9m39s | 9m49s |
| Test | - | - | - | - |
| Deploy | - | - | - | - |
| Suite | 0s | 16m41s | 9m49s | 9m49s |