Beginning of new graph analysis library.

Being used only for cycle detection currently.
Damn, I'm dumb. This was the way I had intended to do this!