Rebuild a package when its dependencies resolve to a different path.

Also simplify a bunch of library code that thought it might have to rebuild
warehouse packages, now that the warehouse contains unipackages.