Reworked dependency result artifact/file ordering to address some issues and to make 'consumer first' the default ordering. Specifically, nodes in the graph are now sorted by component, rather than sorting by node. When sorting by node for a component with multiple nodes in the graph (eg a direct dependency on a maven module from a Gradle project plus a transitive dependency via another maven module, but also possible in other ways) it was possible for a particular component to appear _before_ all of its consumers.
This change affects the arbitrary order for files/artifacts that form a cycle.
Reworked the collection of file dependencies during dependency graph traversal, so that the files from these dependencies are ordered the same way as other kinds of dependencies, rather than always ordering these files at the start of the result.