Move wipe cache|data to libinstall

Therefore, libinstall becomes the sole owner to handle the request
from minadbd service.

The change also includes
1. move logging.cpp out of librecovery
2. drop the dependency on common.h
3. now it's more sensible to move the wipe_cache as part of
install_package. move the wipe_cache to the end of the function.

Bug: 130166585
Test: wipe data and cache from menu
Change-Id: I6f356dccdb38015c50acf756bac246f87c30fc1f
diff --git a/recovery_main.cpp b/recovery_main.cpp
index 8b4ad5a..8f3f2a7 100644
--- a/recovery_main.cpp
+++ b/recovery_main.cpp
@@ -50,7 +50,8 @@
 
 #include "common.h"
 #include "fastboot/fastboot.h"
-#include "logging.h"
+#include "install/wipe_data.h"
+#include "otautil/logging.h"
 #include "otautil/paths.h"
 #include "otautil/roots.h"
 #include "otautil/sysutil.h"
@@ -434,6 +435,8 @@
     ui->Print("Warning: No file_contexts\n");
   }
 
+  SetWipeDataSehandle(sehandle);
+
   std::atomic<Device::BuiltinAction> action;
   std::thread listener_thread(ListenRecoverySocket, ui, std::ref(action));
   listener_thread.detach();