TWRP-ify AOSP code

Pull in most TWRP sources
Stub out partition management code
Make it compile -- probably will not boot
Kind of a mess but have to start somewhere
diff --git a/bootloader.cpp b/bootloader.cpp
index baaddc5..6f4f83a 100644
--- a/bootloader.cpp
+++ b/bootloader.cpp
@@ -16,7 +16,9 @@
 
 #include "bootloader.h"
 #include "common.h"
+extern "C" {
 #include "mtdutils/mtdutils.h"
+}
 #include "roots.h"
 
 #include <errno.h>