For dependency graph, use a graph data structure
Currently the dependency graph is saved as pointers to other contours.
Would be better to save as a graph (using networkx) as the current method means the contour tracker object cannot be saved by pickling. This is a problem because constructing the tracker object can take a while.