Add UpdaterRuntime class

This class adds a wrapper to the runtime dependent functions. Therefore,
the behavior of update on device stays the same, while simulators can
have their own implementations. Also change the caller side of the
registered updater functions to call these runtime wrappers.

Bug: 131911365
Test: unit tests pass, sideload an update on cuttlefish
Change-Id: Ib3ab67132991d67fc132f27120e4152439d16ac5
diff --git a/updater/updater_main.cpp b/updater/updater_main.cpp
index dd22c13..055a8ac 100644
--- a/updater/updater_main.cpp
+++ b/updater/updater_main.cpp
@@ -31,6 +31,7 @@
 #include "updater/dynamic_partitions.h"
 #include "updater/install.h"
 #include "updater/updater.h"
+#include "updater/updater_runtime.h"
 
 // Generated by the makefile, this function defines the
 // RegisterDeviceExtensions() function, which calls all the
@@ -95,8 +96,8 @@
   auto sehandle = selinux_android_file_context_handle();
   selinux_android_set_sehandle(sehandle);
 
-  Updater updater;
-  if (!updater.Init(fd, package_name, is_retry, sehandle)) {
+  Updater updater(std::make_unique<UpdaterRuntime>(sehandle));
+  if (!updater.Init(fd, package_name, is_retry)) {
     return 1;
   }