Correctly set the extraneous flag on dependencies.

The readInstalled_ function sets extraneous=true for every dependency not
required by its direct parent and leaves it to undefined for others.

After the dependency tree has been built, the markExtraneous function will
walk it depth-first and set extraneous=false on dependencies that are not
extraneous and then recurse until all dependencies have been flagged:

for d in dependencies:
  if d.parent is not extraneous:
    set d.extraneous = false
    execute recursively on d.dependencies

This will ensure that extraneous dependencies will not be marked as
extraneous=false incorrectly because of a dependency cycle.