Rearchitect the graph.Iterator and basic types to not be built on a class hierarchy

This change makes simpler reasoning about type interactions by removing the iterator.Base type and using type assertions to define behaviour. There is a net increase in SLOC, but there is very much less action at a distance (virtually none), and where it does happen it is easily identified.