Turbopack: fix bug in handling of module batches (#77638)
### What?
Before that change pre batch boundaries where discovered while
collecting the pre batch items. But in some edge cases this is too late.
A module should be a boundary when any edge fulfills the boundary
condition. So we need to check all incoming edges before traversing the
module for pre batch items.
This adds a step before pre batches, that checks all edges and discovers
all module boundaries.