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/807-method-handle-and-mr/build.py b/test/807-method-handle-and-mr/build.py
index e8e08eb..d317a1a 100644
--- a/test/807-method-handle-and-mr/build.py
+++ b/test/807-method-handle-and-mr/build.py
@@ -13,6 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from art_build_rules import build_run_test
 
-build_run_test(experimental="method-handles")
+def build(ctx):
+  ctx.default_build(experimental="method-handles")