Stop throwing an exception if a Package was successfully created but contains errors. Instead, require callers to process the package and throw if they need to.

This allows us to avoid embedding a Package in an exception, which is icky. This also allows us to remove Package#containsTemporaryErrors.

Most callers' changes are fairly straightforward. The exception is EnvironmentBackedRecursivePackageProvider, which cannot throw an exception of its own in case of a package with errors (because it doesn't do that in keep_going mode), but whose request for a package with errors *should* shut down the build in case of nokeep_going mode. To do this in Skyframe, we have a new PackageErrorFunction which is to be called only in this situation, and will unconditionally throw. EnvironmentBackedRecursivePackageProvider can then catch this exception and continue on as usual, except that the exception will shut down the thread pool in a nokeep_going build.

--
MOS_MIGRATED_REVID=103247761
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java b/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java
index f657f89..81cf6ec 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java
@@ -62,13 +62,8 @@
     if (graph.exists(pkgKey)) {
       pkgValue = (PackageValue) graph.getValue(pkgKey);
       if (pkgValue == null) {
-        NoSuchPackageException noSuchPackageException =
-            (NoSuchPackageException) Preconditions.checkNotNull(graph.getException(pkgKey), pkgKey);
-        Package pkg = noSuchPackageException.getPackage();
-        if (pkg == null) {
-          throw noSuchPackageException;
-        }
-        return pkg;
+        throw (NoSuchPackageException)
+            Preconditions.checkNotNull(graph.getException(pkgKey), pkgKey);
       }
     } else {
       // If the package key does not exist in the graph, then it must not correspond to any package,