move graph data structure into linker

Keep the implementation of the graph specific to my needs with the linker.

If another use case arises the graph can easily be extracted back into dttools.