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.