Use ArchType in dexpreopt config

Make ArchType implement the encoding.TextMarshaller and
encoding.TextUnmarshaller interfaces so that it can be used
as a value in the dexpreopt config structs that are passed
through JSON files.

Test: m checkbuild
Change-Id: Ie4c12443e7ee5fe43f42d5403bcde12d62f617e2
diff --git a/java/dexpreopt.go b/java/dexpreopt.go
index eef51a9..cb6427b 100644
--- a/java/dexpreopt.go
+++ b/java/dexpreopt.go
@@ -100,14 +100,14 @@
 		return dexpreopt.GlobalConfig{}
 	}).(dexpreopt.GlobalConfig)
 
-	var archs []string
+	var archs []android.ArchType
 	for _, a := range ctx.MultiTargets() {
-		archs = append(archs, a.Arch.ArchType.String())
+		archs = append(archs, a.Arch.ArchType)
 	}
 	if len(archs) == 0 {
 		// assume this is a java library, dexpreopt for all arches for now
 		for _, target := range ctx.Config().Targets[android.Android] {
-			archs = append(archs, target.Arch.ArchType.String())
+			archs = append(archs, target.Arch.ArchType)
 		}
 		if inList(ctx.ModuleName(), globalConfig.SystemServerJars) && !d.isSDKLibrary {
 			// If the module is not an SDK library and it's a system server jar, only preopt the primary arch.