update_engine: Load minor_version from the FilesystemInterface.

In the normal use case, cros_generate_update_payload doesn't pass the
requested minor_version to delta_generator which means we need to detect
it from the old image. To detect it, we where looking at the
update_engine.conf file in the mounted source directory. This patch uses
the recently added FilesystemInterface::LoadSettings() method to read
the update_engine.conf settings from the source rootfs partition.

In order to make this information available when autodetecting the
minor_version and to help future FilesystemInterface mocking for
testing, we move the FilesystemInterface instance from inside the
OperationsGenerator class to the PartitionConfig, so the filesystems are
opened before calling GenerateUpdatePayloadFile.

This patch then deprecates the --old_dir flag removing the requirement
to run delta_generator and cros_generate_update_payload as root when
generating deltas.

BUG=chromium:305832
TEST=Ran cros_generate_update_payload to generate deltas from old (link
FSI) and new (ToT link) images.

Change-Id: I915679d62aae2d1a2acee68cc8c1ec691cc363ad
Reviewed-on: https://chromium-review.googlesource.com/283643
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/utils.cc b/utils.cc
index f36cbec..97ce712 100644
--- a/utils.cc
+++ b/utils.cc
@@ -38,7 +38,6 @@
 #include <base/strings/string_util.h>
 #include <base/strings/stringprintf.h>
 #include <chromeos/data_encoding.h>
-#include <chromeos/key_value_store.h>
 #include <chromeos/message_loops/message_loop.h>
 
 #include "update_engine/clock_interface.h"
@@ -1628,11 +1627,10 @@
   return ret;
 }
 
-bool GetMinorVersion(base::FilePath path, uint32_t* minor_version) {
-  chromeos::KeyValueStore store;
+bool GetMinorVersion(const chromeos::KeyValueStore& store,
+                     uint32_t* minor_version) {
   string result;
-  if (base::PathExists(path) && store.Load(path) &&
-      store.GetString("PAYLOAD_MINOR_VERSION", &result)) {
+  if (store.GetString("PAYLOAD_MINOR_VERSION", &result)) {
     if (!base::StringToUint(result, minor_version)) {
       LOG(ERROR) << "StringToUint failed when parsing delta minor version.";
       return false;