findCycles

Finds all cycles in the graph and returns them as lists of module paths. Returns an empty list if the graph is acyclic.

Iterative DFS - safe on graphs deep enough to blow a recursive call stack. Each back-edge to an on-stack node emits the sub-path between that node and the current frame as one cycle. Cycles of length 1 (self-loops) are filtered out.