[repacker] add graph equality check. Does not compare topological sorting, but looks for equivalence of the two graphs.