Graphviz link traversal rewrite to breadth-first

Howewer the patch I wrote to this module solves the problem of skipping
links, ticket depth is still miscalculated.

Now I made the full rewrite and make it process the tickets level by
level.