Digraph for packages with proper "solving" based on dep graph depths

Oops, leftovers, we still need to export a type here but not these types. They are used in `rebar_state` at least. One sec.