twrpinstall: create library for twrpinstall

This library will need to mirror AOSP for any changes to installing
packages. The library has been separated out in order to make importing
updates from AOSP into the TWRP project.

twinstall.cpp has been removed from the recovery binary and added to
this library. It has been refactored for libziparchive.

Sideload has been reworked to use the newer methods from AOSP on
flashing packages through adb sideload.

We are also removing old libraries for adb and verifier.

Lastly before flashing a zip or image, we want to unlock block devices
for writing so that when an OTA is flashed to the inactive slot,
the flash will succeed.

Change-Id: I6d8702fc9031ffaf9f666b4ba375dc7d9362e473
diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp
index c6f7d80..036d6ca 100755
--- a/openrecoveryscript.cpp
+++ b/openrecoveryscript.cpp
@@ -51,7 +51,7 @@
 #include "gui/pages.hpp"
 #include "orscmd/orscmd.h"
 #include "twinstall.h"
-#include "install/adb_install.h"
+#include "twinstall/adb_install.h"
 extern "C" {
 	#include "gui/gui.h"
 	#include "cutils/properties.h"
@@ -388,8 +388,9 @@
 				} else {
 					ret_val = 1; // failure
+				PartitionManager.Unlock_Block_Partitions();
 				sideload = 1; // Causes device to go to the home screen afterwards
-#ifdef USE_28_INSTALL 
+				pid_t sideload_child_pid = GetMiniAdbdPid();
 				if (sideload_child_pid != 0) {
 					LOGINFO("Signaling child sideload process to exit.\n");
 					struct stat st;
@@ -400,7 +401,6 @@
 					LOGINFO("Waiting for child sideload process to exit.\n");
 					waitpid(sideload_child_pid, &status, 0);
 				property_set("ctl.start", "adbd");
 			} else if (strcmp(command, "fixperms") == 0 || strcmp(command, "fixpermissions") == 0 || strcmp(command, "fixcontexts") == 0) {