Implement a new graph based algorithm for configuration resolution.

The old algorithm failed to chose a valid configuration for many complex dependency graphs (worked reliably only for trees).