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.h b/utils.h
index 6a9e065..b661b43 100644
--- a/utils.h
+++ b/utils.h
@@ -19,6 +19,7 @@
 #include <base/posix/eintr_wrapper.h>
 #include <base/time/time.h>
 #include <chromeos/secure_blob.h>
+#include <chromeos/key_value_store.h>
 #include "metrics/metrics_library.h"
 
 #include "update_engine/action.h"
@@ -424,13 +425,10 @@
                              int64_t* storage,
                              base::TimeDelta* out_duration);
 
-// This function looks for a configuration file at |path|. If it finds that
-// file, it will try get the PAYLOAD_MINOR_VERSION value from it and set
-// |minor_version| to that value.
-//
-// The function will return |true| if it succeeds at finding the file and
-// value and setting it, and |false| otherwise.
-bool GetMinorVersion(base::FilePath path, uint32_t* minor_version);
+// Look for the minor version value in the passed |store| and set
+// |minor_version| to that value. Return whether the value was found and valid.
+bool GetMinorVersion(const chromeos::KeyValueStore& store,
+                     uint32_t* minor_version);
 
 // This function reads the specified data in |extents| into |out_data|. The
 // extents are read from the file at |path|. |out_data_size| is the size of