brillo_Gtests: Support running in the lab.

* Updated brillo_Gtests to download and install the nativetests
  package when running in the lab.
* Updated/refactored adb_host's download_file method to handle
  unzipping of files.
* Fixed a bug in get_build_from_afe to support Android/Brillo
  builds.

BUG=b:26967765
TEST=Ran brillo_Gtests on a MobLab.

Change-Id: I26c968a8d0a3fc7556e40ee1c11ad0bb4d5c8854
Reviewed-on: https://chromium-review.googlesource.com/336271
Commit-Ready: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
diff --git a/server/site_utils.py b/server/site_utils.py
index 4865e09..330c6f9 100644
--- a/server/site_utils.py
+++ b/server/site_utils.py
@@ -18,6 +18,7 @@
 from autotest_lib.client.common_lib import error
 from autotest_lib.client.common_lib import global_config
 from autotest_lib.client.common_lib import host_queue_entry_states
+from autotest_lib.server.cros import provision
 from autotest_lib.server.cros.dynamic_suite import constants
 from autotest_lib.server.cros.dynamic_suite import job_status
 
@@ -149,7 +150,12 @@
              were multiple build labels assigned to this host.
 
     """
-    return get_label_from_afe(hostname, constants.VERSION_PREFIX, afe)
+    for prefix in [provision.CROS_VERSION_PREFIX,
+                   provision.ANDROID_BUILD_VERSION_PREFIX]:
+        build = get_label_from_afe(hostname, prefix + ':', afe)
+        if build:
+            return build
+    return None
 
 
 def get_sheriffs(lab_only=False):