Adding cycle tests for undirected graphs.

Cycle tests using dfs only worked for directed graphs in the past. This commit
adds this functionality. The main change is the addition of a colormap for
edges in addition to the colormap for vertices.