Perform package loading in parallel with transitive target visitation. This is a partial rollback of commit f1e257d because it turns out that loading sequentially can be a bottleneck.

--
MOS_MIGRATED_REVID=112628616
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfPatternFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfPatternFunction.java
index 14c83ed..a2e3910 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfPatternFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfPatternFunction.java
@@ -236,13 +236,13 @@
 
       for (Path root : roots) {
         RootedPath rootedPath = RootedPath.toRootedPath(root, pathFragment);
-        SkyValue token =
-            env.getValue(
+        env.getValues(
+            ImmutableList.of(
                 PrepareDepsOfTargetsUnderDirectoryValue.key(
-                    repository, rootedPath, excludedSubdirectories, policy));
-        if (token == null) {
-          // A null token value means there is a missing dependency, because RecursivePkgFunction
-          // never throws.
+                    repository, rootedPath, excludedSubdirectories, policy),
+                CollectPackagesUnderDirectoryValue.key(
+                    repository, rootedPath, excludedSubdirectories)));
+        if (env.valuesMissing()) {
           throw new MissingDepException();
         }
       }