Bug 1046891 - Add dependency management to Runner

Tracking PR so I can get feedback, do not merge.

Tests en route.

@catlee r?
using a @classmethod here would make it a bit nicer to refer to _nodes_with_edges_to