Refactor individual run-test build scripts

Follow the same convention as run-test run scripts.

The python files shall export build function,
rather than doing the work when the script is loaded.

This has the advantage that we now pass context/arguments
to the function (rather than using environment variables).

Test: the generated build artefacts are identical
Change-Id: I90e0ef0d2e31b27813042d51d07b5ae132e1e704
diff --git a/test/art_build_rules.py b/test/art_build_rules.py
index 765289d..b1e81be 100644
--- a/test/art_build_rules.py
+++ b/test/art_build_rules.py
@@ -44,7 +44,8 @@
       else:
         os.remove(path)
 
-def build_run_test(
+def default_build(
+    ctx,
     use_desugar=True,
     use_hiddenapi=True,
     need_dex=None,