update_engine: Make InstallPlan's dump nicer

Its really hard to read anything out of the current InstallPlan's
logs. This CL makes it a bit more structured so it can be read easier.

Also added a few other properties of InstallPlan that were missing in
the Dump().

Added unittest for it too.

BUG=b:171829801
TEST=cros_workon_make --board reef --test update_engine

Change-Id: Iaa327e875877e9645ef8f0af875c280e11ee485d
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2558933
Tested-by: Amin Hassani <ahassani@chromium.org>
Auto-Submit: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/payload_consumer/install_plan.h b/payload_consumer/install_plan.h
index 16e5674..2026635 100644
--- a/payload_consumer/install_plan.h
+++ b/payload_consumer/install_plan.h
@@ -45,6 +45,7 @@
   bool operator!=(const InstallPlan& that) const;
 
   void Dump() const;
+  std::string ToString() const;
 
   // Loads the |source_path| and |target_path| of all |partitions| based on the
   // |source_slot| and |target_slot| if available. Returns whether it succeeded