Refactor dexpreopt_bootjars.go to prepare for multiple boot images

Refactor dexpreopt_bootjars.go so that buildBootImage can be called
with a bootImageConfig to create rules to build the boot image in
preparation for building multiple boot images.

Test: m checkbuild
Change-Id: I7ba40a0988c8acbd6c1ee4e36f4bbb34fb4e2d24
diff --git a/java/testing.go b/java/testing.go
index bec3c0b..6c4020c 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -32,7 +32,7 @@
 	config.TestProductVariables.DeviceSystemSdkVersions = []string{"14", "15"}
 
 	pathCtx := android.PathContextForTesting(config, nil)
-	setDexpreoptGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx))
+	setDexpreoptTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx))
 
 	return config
 }