Rearchitect

This PR refactors to remove duplication.

 - create an abstract base class `IDirectedGraph`, from which the concrete classes `DirectedGraph` and `ObjectGraph` inherit.
 - Add a new `AnnotatedGraph` subclass of `IDirectedGraph`.  This is what you get if you serialize an `ObjectGraph` instance and then unserialize it in another process (so that it no longer has references to the original objects).