Fix cyclic test for graps with ExVert vertices.

The test_cyclic_by_dfs method previously assumed that the graph being passed
in had vertices of type int. This caused an exception to be thrown when trying
to run test_cyclic_by_dfs on graphs with ExVert vertices.

This commit resolves the issue.