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/postinstall_runner_action.h b/postinstall_runner_action.h
index 6979975..2308a0f 100644
--- a/postinstall_runner_action.h
+++ b/postinstall_runner_action.h
@@ -15,27 +15,10 @@
 
 namespace chromeos_update_engine {
 
-class PostinstallRunnerAction;
-class NoneType;
-
-template<>
-class ActionTraits<PostinstallRunnerAction> {
+class PostinstallRunnerAction : public InstallPlanAction {
  public:
-  // Takes the device path as input
-  typedef InstallPlan InputObjectType;
-  // Passes the device path as output
-  typedef InstallPlan OutputObjectType;
-};
+  PostinstallRunnerAction(): powerwash_marker_created_(false) {}
 
-class PostinstallRunnerAction : public Action<PostinstallRunnerAction> {
- public:
-  PostinstallRunnerAction()
-    : powerwash_marker_created_(false) {}
-
-  typedef ActionTraits<PostinstallRunnerAction>::InputObjectType
-      InputObjectType;
-  typedef ActionTraits<PostinstallRunnerAction>::OutputObjectType
-      OutputObjectType;
   void PerformAction();
 
   // Note that there's no support for terminating this action currently.
@@ -52,6 +35,7 @@
                                         const std::string& output,
                                         void* p);
 
+  InstallPlan install_plan_;
   std::string temp_rootfs_dir_;
 
   // True if Powerwash Marker was created before invoking post-install script.