improve the OTA progress bar

Make the OTA progress bar advance a bit more smoothly by reallocating
how much is dedicated to various phases of incremental OTA
installation, based on some crude measurements of how long each phase
takes.
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index e7a15cd..d1902e1 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -100,9 +100,16 @@
 
   def ShowProgress(self, frac, dur):
     """Update the progress bar, advancing it over 'frac' over the next
-    'dur' seconds."""
+    'dur' seconds.  'dur' may be zero to advance it via SetProgress
+    commands instead of by time."""
     self.script.append("show_progress(%f, %d);" % (frac, int(dur)))
 
+  def SetProgress(self, frac):
+    """Set the position of the progress bar within the chunk defined
+    by the most recent ShowProgress call.  'frac' should be in
+    [0,1]."""
+    self.script.append("set_progress(%f);" % (frac,))
+
   def PatchCheck(self, filename, *sha1):
     """Check that the given file (or MTD reference) has one of the
     given *sha1 hashes."""