AU: do not copy filesystem during full updates

The filesystem copying stage is redundant during full updates, where the
partition is being entirely overwritten regardless of its previous
content. It is also a very wasteful step, causing intensive I/O and
kernel buffer pressure, and known to (sometimes) cause jank and
otherwise have detrimental effects on our user experience.

This CL eliminates filesystem copying for full updates:

1) The decision is based on whether the Omaha response indicates that
   this is a full update.

2) To be safe, we also ensure that the payload manifest does not contain
   old partition hashes, which is indicative of a delta update.

Note that it is generally desirable to base the decision solely on #2
above (and ignore #1 altogether). However, this will require more
extensive re-engineering of the update flow, as filesystem copying
currently happens prior to the manifest being downloaded.

BUG=chromium:189855
TEST=Full and delta updates run correctly on x86-alex

Change-Id: Ic0dc6e32913cfb96019606624ec6b87c2e5b3ebb
Reviewed-on: https://gerrit.chromium.org/gerrit/43665
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/install_plan.cc b/install_plan.cc
index 59bd5da..a17cb52 100644
--- a/install_plan.cc
+++ b/install_plan.cc
@@ -13,6 +13,7 @@
 namespace chromeos_update_engine {
 
 InstallPlan::InstallPlan(bool is_resume,
+                         bool is_full_update,
                          const string& url,
                          uint64_t payload_size,
                          const string& payload_hash,
@@ -21,6 +22,7 @@
                          const string& install_path,
                          const string& kernel_install_path)
     : is_resume(is_resume),
+      is_full_update(is_full_update),
       download_url(url),
       payload_size(payload_size),
       payload_hash(payload_hash),
@@ -34,6 +36,7 @@
       powerwash_required(false) {}
 
 InstallPlan::InstallPlan() : is_resume(false),
+                             is_full_update(false),  // play it safe.
                              payload_size(0),
                              metadata_size(0),
                              kernel_size(0),
@@ -44,6 +47,7 @@
 
 bool InstallPlan::operator==(const InstallPlan& that) const {
   return ((is_resume == that.is_resume) &&
+          (is_full_update == that.is_full_update) &&
           (download_url == that.download_url) &&
           (payload_size == that.payload_size) &&
           (payload_hash == that.payload_hash) &&
@@ -59,7 +63,8 @@
 
 void InstallPlan::Dump() const {
   LOG(INFO) << "InstallPlan: "
-            << (is_resume ? ", resume" : ", new_update")
+            << (is_resume ? "resume" : "new_update")
+            << ", payload type: " << (is_full_update ? "full" : "delta")
             << ", url: " << download_url
             << ", payload size: " << payload_size
             << ", payload hash: " << payload_hash