Make aspects support SkylarkApiProviders.

These are initialised with a TransitiveInfoCollection, which aspects do not implement. By fiddling with the interfaces we can pull out a ProviderCollection which is sufficient for a SkylarkApiProvider to operate.

RELNOTES: None
PiperOrigin-RevId: 215441598
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/TransitiveInfoCollection.java b/src/main/java/com/google/devtools/build/lib/analysis/TransitiveInfoCollection.java
index 1ba59847..75f253c 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/TransitiveInfoCollection.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/TransitiveInfoCollection.java
@@ -45,7 +45,7 @@
  * @see TransitiveInfoProvider
  */
 public interface TransitiveInfoCollection
-    extends SkylarkIndexable, SkylarkProviderCollection, TransitiveInfoCollectionApi {
+    extends SkylarkIndexable, ProviderCollection, TransitiveInfoCollectionApi {
 
   @Override
   default SkylarkNestedSet outputGroup(String group) {
@@ -57,12 +57,6 @@
   }
 
   /**
-   * Returns the transitive information provider requested, or null if the provider is not found.
-   * The provider has to be a TransitiveInfoProvider Java class.
-   */
-  @Nullable <P extends TransitiveInfoProvider> P getProvider(Class<P> provider);
-
-  /**
    * Returns the label associated with this prerequisite.
    */
   Label getLabel();