Allow Skyframe graph lookups and value retrievals to throw InterruptedException.

The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer.

--
MOS_MIGRATED_REVID=130327770
diff --git a/src/main/java/com/google/devtools/build/lib/pkgcache/PackageProvider.java b/src/main/java/com/google/devtools/build/lib/pkgcache/PackageProvider.java
index b99d797..23464b4 100644
--- a/src/main/java/com/google/devtools/build/lib/pkgcache/PackageProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/pkgcache/PackageProvider.java
@@ -47,17 +47,19 @@
   /**
    * Returns whether a package with the given name exists. That is, returns whether all the
    * following hold
+   *
    * <ol>
-   *   <li>{@code packageName} is a valid package name</li>
-   *   <li>there is a BUILD file for the package</li>
-   *   <li>the package is not considered deleted via --deleted_packages</li>
+   * <li>{@code packageName} is a valid package name
+   * <li>there is a BUILD file for the package
+   * <li>the package is not considered deleted via --deleted_packages
    * </ol>
    *
-   * <p> If these don't hold, then attempting to read the package with {@link #getPackage} may fail
+   * <p>If these don't hold, then attempting to read the package with {@link #getPackage} may fail
    * or may return a package containing errors.
    *
    * @param eventHandler the eventHandler on which to report warnings and errors
    * @param packageName the name of the package.
    */
-  boolean isPackage(EventHandler eventHandler, PackageIdentifier packageName);
+  boolean isPackage(EventHandler eventHandler, PackageIdentifier packageName)
+      throws InterruptedException;
 }
diff --git a/src/main/java/com/google/devtools/build/lib/pkgcache/RecursivePackageProvider.java b/src/main/java/com/google/devtools/build/lib/pkgcache/RecursivePackageProvider.java
index 37c81b0..bdf3baa 100644
--- a/src/main/java/com/google/devtools/build/lib/pkgcache/RecursivePackageProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/pkgcache/RecursivePackageProvider.java
@@ -21,7 +21,6 @@
 import com.google.devtools.build.lib.packages.Package;
 import com.google.devtools.build.lib.vfs.PathFragment;
 import com.google.devtools.build.lib.vfs.RootedPath;
-
 import java.util.Map;
 
 /**
@@ -32,16 +31,18 @@
   /**
    * Returns the names of all the packages under a given directory.
    *
-   * <p>Packages returned by this method and passed into
-   * {@link #bulkGetPackages(EventHandler, Iterable)} are expected to return successful
-   * {@link Package} values.
+   * <p>Packages returned by this method and passed into {@link #bulkGetPackages(EventHandler,
+   * Iterable)} are expected to return successful {@link Package} values.
    *
    * @param directory a {@link RootedPath} specifying the directory to search
-   * @param excludedSubdirectories a set of {@link PathFragment}s, all of which are beneath
-   *     {@code directory}, specifying transitive subdirectories to exclude
+   * @param excludedSubdirectories a set of {@link PathFragment}s, all of which are beneath {@code
+   *     directory}, specifying transitive subdirectories to exclude
    */
-  Iterable<PathFragment> getPackagesUnderDirectory(RepositoryName repository,
-      PathFragment directory, ImmutableSet<PathFragment> excludedSubdirectories);
+  Iterable<PathFragment> getPackagesUnderDirectory(
+      RepositoryName repository,
+      PathFragment directory,
+      ImmutableSet<PathFragment> excludedSubdirectories)
+      throws InterruptedException;
 
 
   /**
diff --git a/src/main/java/com/google/devtools/build/lib/pkgcache/TargetEdgeObserver.java b/src/main/java/com/google/devtools/build/lib/pkgcache/TargetEdgeObserver.java
index 294920a..9e30d92 100644
--- a/src/main/java/com/google/devtools/build/lib/pkgcache/TargetEdgeObserver.java
+++ b/src/main/java/com/google/devtools/build/lib/pkgcache/TargetEdgeObserver.java
@@ -18,7 +18,6 @@
 import com.google.devtools.build.lib.packages.Attribute;
 import com.google.devtools.build.lib.packages.NoSuchThingException;
 import com.google.devtools.build.lib.packages.Target;
-
 import javax.annotation.Nullable;
 
 /**
@@ -41,13 +40,13 @@
   /**
    * Called when a Target has a reference to a non-existent target.
    *
-   * @param target the target.  May be null (e.g. in the case of an implicit
-   *   dependency on a subincluded file).
-   * @param to a label reference in the rule, which does not correspond
-   *     to a valid target.
+   * @param target the target. May be null (e.g. in the case of an implicit dependency on a
+   *     subincluded file).
+   * @param to a label reference in the rule, which does not correspond to a valid target.
    * @param e the corresponding exception thrown
    */
-  void missingEdge(@Nullable Target target, Label to, NoSuchThingException e);
+  void missingEdge(@Nullable Target target, Label to, NoSuchThingException e)
+      throws InterruptedException;
 
   /**
    * Called when a node is discovered. May be called
diff --git a/src/main/java/com/google/devtools/build/lib/pkgcache/TargetPatternResolverUtil.java b/src/main/java/com/google/devtools/build/lib/pkgcache/TargetPatternResolverUtil.java
index d00db1e..d8534ca 100644
--- a/src/main/java/com/google/devtools/build/lib/pkgcache/TargetPatternResolverUtil.java
+++ b/src/main/java/com/google/devtools/build/lib/pkgcache/TargetPatternResolverUtil.java
@@ -49,9 +49,9 @@
     return builder.build();
   }
 
-  public static void validatePatternPackage(String originalPattern,
-      PathFragment packageNameFragment, TargetPatternResolver<?> resolver)
-      throws TargetParsingException {
+  public static void validatePatternPackage(
+      String originalPattern, PathFragment packageNameFragment, TargetPatternResolver<?> resolver)
+      throws TargetParsingException, InterruptedException {
     String packageName = packageNameFragment.toString();
     // It's possible for this check to pass, but for
     // Label.validatePackageNameFull to report an error because the