Redefines flag ordering for 'Group's.

Flag order for a given component is now defined as:
  * package internal cflags
  * package external cflags
  * package include cflags
  * group internal cflags
  * group external cflags
  * dependent targets external cflags
Assumes validity of package paths and names.

Since paths and names of packages are inferred from package group metadata,
searching through multiple roots to find packages is unnecessary.  This code is
a remnant of the general resolver code and is removed.
Removes implicit caching from resolvers.

In an effort to ease testability of the resolvers, implicit caching is removed
from their implementations.  To ensure performance, however, any resolution is
supplied with a 'dict' guaranteed to contain any dependency already resolved.
This guarantee can be provided by resolving units starting from the lowest
levels in the dependency hierarchy (i.e. reversing the topological sort).