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/mtdutils/mtdutils.h b/mtdutils/mtdutils.h
index 2708c43..c57d45d 100644
--- a/mtdutils/mtdutils.h
+++ b/mtdutils/mtdutils.h
@@ -19,10 +19,6 @@
 
 #include <sys/types.h>  // for size_t, etc.
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct MtdPartition MtdPartition;
 
 int mtd_scan_partitions(void);
@@ -57,8 +53,11 @@
 off_t mtd_find_write_start(MtdWriteContext *ctx, off_t pos);
 int mtd_write_close(MtdWriteContext *);
 
-#ifdef __cplusplus
-}
-#endif
+struct MtdPartition {
+    int device_index;
+    unsigned int size;
+    unsigned int erase_size;
+    char *name;
+};
 
 #endif  // MTDUTILS_H_