applypatch: Remove the 'st' field from FileContents.

It used to keep track of the stat(2) info (e.g. st_mode/st_gid/st_uid)
while patching a file in file-based OTA.

Test: Build and use the new updater to apply an update on bullhead.
Change-Id: Ibf8f0f4b14298a9489bf24a2678bb279c5d9c8f3
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index 41a72eb..04b964b 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -58,12 +58,13 @@
     return LoadPartitionContents(filename, file);
   }
 
-  if (stat(filename, &file->st) == -1) {
+  struct stat sb;
+  if (stat(filename, &sb) == -1) {
     printf("failed to stat \"%s\": %s\n", filename, strerror(errno));
     return -1;
   }
 
-  std::vector<unsigned char> data(file->st.st_size);
+  std::vector<unsigned char> data(sb.st_size);
   unique_file f(ota_fopen(filename, "rb"));
   if (!f) {
     printf("failed to open \"%s\": %s\n", filename, strerror(errno));
@@ -180,10 +181,6 @@
 
   buffer.resize(buffer_size);
   file->data = std::move(buffer);
-  // Fake some stat() info.
-  file->st.st_mode = 0644;
-  file->st.st_uid = 0;
-  file->st.st_gid = 0;
 
   return 0;
 }
@@ -212,15 +209,6 @@
     return -1;
   }
 
-  if (chmod(filename, file->st.st_mode) != 0) {
-    printf("chmod of \"%s\" failed: %s\n", filename, strerror(errno));
-    return -1;
-  }
-  if (chown(filename, file->st.st_uid, file->st.st_gid) != 0) {
-    printf("chown of \"%s\" failed: %s\n", filename, strerror(errno));
-    return -1;
-  }
-
   return 0;
 }