Generalize EdgeIterator to GraphIterator