Implement Rollback to previously booted partitions.

This CL implements rollback to whatever partition we ran from before.
We expose this functionality via dbus under AttemptRollback and expose
a new command-line option to update_engine_client that a developer can
use.

BUG=chromium:242665
TEST=Unittests, full update, update + rollback and verified.

Change-Id: Ie59f90b9a0b777dc1329592449090c70892236bf
Reviewed-on: https://gerrit.chromium.org/gerrit/58427
Commit-Queue: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
diff --git a/download_action.h b/download_action.h
index 318ece8..020aa9c 100644
--- a/download_action.h
+++ b/download_action.h
@@ -41,19 +41,9 @@
   virtual void BytesReceived(uint64_t bytes_received, uint64_t total) = 0;
 };
 
-class DownloadAction;
-class NoneType;
 class PrefsInterface;
 
-template<>
-class ActionTraits<DownloadAction> {
- public:
-  // Takes and returns an InstallPlan
-  typedef InstallPlan InputObjectType;
-  typedef InstallPlan OutputObjectType;
-};
-
-class DownloadAction : public Action<DownloadAction>,
+class DownloadAction : public InstallPlanAction,
                        public HttpFetcherDelegate {
  public:
   // Takes ownership of the passed in HttpFetcher. Useful for testing.
@@ -63,8 +53,6 @@
                  SystemState* system_state,
                  HttpFetcher* http_fetcher);
   virtual ~DownloadAction();
-  typedef ActionTraits<DownloadAction>::InputObjectType InputObjectType;
-  typedef ActionTraits<DownloadAction>::OutputObjectType OutputObjectType;
   void PerformAction();
   void TerminateProcessing();