Simplify AnalysisEnvironment creation.

Instead of computing flags based on the configuration in two places, we pass
in the configuration and let the common code figure it out.

Also change it so each CT only depends on the build info collection for its
specific configuration. This should be safe, as the API doesn't allow passing
a configuration in - it instead takes ruleContext.getConfiguration, which
should be consistent with the dependency declarations in SkyframeBuildView in
all cases.

--
MOS_MIGRATED_REVID=91819844
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
index f1aa2f6e..30358ac 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
@@ -122,11 +122,10 @@
       throws AspectFunctionException {
     SkyframeBuildView view = buildViewProvider.getSkyframeBuildView();
     BuildConfiguration configuration = associatedTarget.getConfiguration();
-    boolean extendedSanityChecks = configuration != null && configuration.extendedSanityChecks();
 
     StoredEventHandler events = new StoredEventHandler();
     CachingAnalysisEnvironment analysisEnvironment = view.createAnalysisEnvironment(
-        key, false, extendedSanityChecks, events, env, true);
+        key, false, events, env, configuration);
     if (env.valuesMissing()) {
       return null;
     }