Remove direct deps from build id computation.

We don't need the direct deps in the build id: if I'm a package and my
direct dependencies change, then no one who depends on me has to
rebuild. On the other hand, if my plugin's (transitive) dependencies
change, then anyone who directly depends on me does need to rebuild
because my plugins need to re-run.
Fix buildDir of package cache entry after fresh build.