devserver: stage images using image archive uploaded to Google Storage

This adds a devserver feature that'll download an stage individual
images from the builders' Google Storage archive
(gs://chromeos-image-archive).

- Defines a new CherryPy URL (stage_images) and hooks it to the staging
  code.

- Implements a downloader for the image archive zipfile (image.zip),
  which will fetch it to a temporary directory and unzip the desired
  images to the target (staging) directory.

- Uses a flag file for recording the set of images that have already
  been staged for a given build.

BUG=chromium-os:33762
TEST=devserver stages requested image files, which can be served in
subsequent requests.

Change-Id: I339bd0edb1511c68cca36378c189551511ad1639
Reviewed-on: https://gerrit.chromium.org/gerrit/33140
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/downloader_unittest.py b/downloader_unittest.py
index 56df93c..3c9e34b 100755
--- a/downloader_unittest.py
+++ b/downloader_unittest.py
@@ -104,8 +104,8 @@
     d = downloader.Downloader(self._work_dir)
     self.mox.StubOutWithMock(d, 'GatherArtifactDownloads')
     d.GatherArtifactDownloads(
-        self._work_dir, self.archive_url_prefix, self.build,
-        self._work_dir).AndReturn(artifacts)
+        self._work_dir, self.archive_url_prefix, self._work_dir,
+        self.build).AndReturn(artifacts)
     return d
 
   def _ClassUnderTest(self):
@@ -168,8 +168,8 @@
     """Tests interaction between the downloader and devserver methods."""
     artifacts = self._CommonDownloaderSetup(ignore_background=True)
     devserver_util.GatherArtifactDownloads(
-        self._work_dir, self.archive_url_prefix, self.build,
-        self._work_dir).AndReturn(artifacts)
+        self._work_dir, self.archive_url_prefix, self._work_dir,
+        self.build).AndReturn(artifacts)
 
     class FakeUpdater():
       static_dir = self._work_dir
@@ -224,7 +224,7 @@
     d = downloader.SymbolDownloader(self._work_dir)
     self.mox.StubOutWithMock(d, 'GatherArtifactDownloads')
     d.GatherArtifactDownloads(
-        self._work_dir, self.archive_url_prefix, '',
+        self._work_dir, self.archive_url_prefix,
         self._work_dir).AndReturn(artifacts)
     return d