Move dexpreopt.Script to android.RuleBuilder

Move dexpreopt.Script to android.RuleBuilder so that the builder
style can be used in more places.  Also add tests for it.

Test: rule_builder_test.go
Change-Id: I92a963bd112bf033b08899e930094b908acfcdfd
diff --git a/Android.bp b/Android.bp
index a70f73c..5e9c600 100644
--- a/Android.bp
+++ b/Android.bp
@@ -61,6 +61,7 @@
         "android/prebuilt_etc.go",
         "android/proto.go",
         "android/register.go",
+        "android/rule_builder.go",
         "android/sh_binary.go",
         "android/singleton.go",
         "android/testing.go",
@@ -80,6 +81,7 @@
         "android/paths_test.go",
         "android/prebuilt_test.go",
         "android/prebuilt_etc_test.go",
+        "android/rule_builder_test.go",
         "android/util_test.go",
         "android/variable_test.go",
     ],