Re-land "[dev-util] Add symbolicate_dump endpoint to dev server"

This reverts commit 50fe427cb8cebf7dca441e92463c407cb90fddf3.

Add an endpoint to the dev server that will symbolicate a minidump.

BUG=chromium-os:29850
TEST=unit
TEST=run dev server, use curl to make it download some artifacts; check to
TEST=see that debug symbols are staged in static/archive
TEST=once symbols are staged, run the dev server in your
TEST=chroot and use curl with a minidump file like this:
TEST=  curl -F minidump=@/home/cmasone/chromeos/phooey/powerd.20120424.141235.1005.dmp http://localhost:8080/symbolicate_dump

Change-Id: Ib9c11afd780aea5a665358b43f03a210ecc83482
Reviewed-on: https://gerrit.chromium.org/gerrit/21541
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Scott Zawalski <scottz@chromium.org>
diff --git a/devserver_util.py b/devserver_util.py
index eb498f4..e40ae7e 100644
--- a/devserver_util.py
+++ b/devserver_util.py
@@ -57,12 +57,15 @@
   return full_payload_url, nton_payload_url, mton_payload_url
 
 
-def GatherArtifactDownloads(main_staging_dir, archive_url, build, build_dir):
+def GatherArtifactDownloads(main_staging_dir, archive_url, build, build_dir,
+                            static_dir):
   """Generates artifacts that we mean to download and install for autotest.
 
   This method generates the list of artifacts we will need for autotest. These
-  artifacts are instances of downloadable_artifact.DownloadableArtifact.Note,
-  these artifacts can be downloaded asynchronously iff !artifact.Synchronous().
+  artifacts are instances of downloadable_artifact.DownloadableArtifact.
+
+  Note, these artifacts can be downloaded asynchronously iff
+  !artifact.Synchronous().
   """
   cmd = 'gsutil ls %s/*.bin' % archive_url
   msg = 'Failed to get a list of payloads.'
@@ -87,6 +90,7 @@
         mton_url, main_staging_dir, mton_payload))
 
   # Next we gather the miscellaneous payloads.
+  debug_url = archive_url + '/' + downloadable_artifact.DEBUG_SYMBOLS
   stateful_url = archive_url + '/' + downloadable_artifact.STATEFUL_UPDATE
   autotest_url = archive_url + '/' + downloadable_artifact.AUTOTEST_PACKAGE
   test_suites_url = (archive_url + '/' +
@@ -95,6 +99,8 @@
   stateful_payload = os.path.join(build_dir,
                                   downloadable_artifact.STATEFUL_UPDATE)
 
+  artifacts.append(downloadable_artifact.DebugTarball(
+      debug_url, main_staging_dir, static_dir))
   artifacts.append(downloadable_artifact.DownloadableArtifact(
       stateful_url, main_staging_dir, stateful_payload, synchronous=True))
   artifacts.append(downloadable_artifact.AutotestTarball(