Support rust modules when packaging aconfig files in apex.

Also remove the code to package aconfig files for transitive
dependencies since those files should have already been included in the
direct dependencies.

Bug: 311173471
Test: Unit tests
Change-Id: I25637af9381f71a78b70a8de9894618188c9735d
diff --git a/aconfig/aconfig_declarations.go b/aconfig/aconfig_declarations.go
index 593ccc0..697dc22 100644
--- a/aconfig/aconfig_declarations.go
+++ b/aconfig/aconfig_declarations.go
@@ -211,6 +211,7 @@
 }
 
 func mergeAconfigFiles(ctx android.ModuleContext, inputs android.Paths) android.Paths {
+	inputs = android.LastUniquePaths(inputs)
 	if len(inputs) == 1 {
 		return android.Paths{inputs[0]}
 	}