Move stuff from recovery into librecovery.

Move most source files into librecovery so they become testable. Only
recovery_main.cpp and logging.cpp are built into recovery module, as
they perform one-time setup (e.g. setting up logger).

Test: `mmma -j bootable/recovery` with
      aosp_{angler,bullhead,fugu,dragon,marlin}-userdebug
Test: recovery_host_test; recovery_unit_test; recovery_component_test;
      recovery_manual_test
Test: Build and boot into recovery image on angler.
Change-Id: Ic4444f87a2f123557c71085f81dc2b2764c05ed8
(cherry picked from commit bf4c006d7bc8a4517c82399bbffd9cb09971c0b4)
diff --git a/tests/Android.mk b/tests/Android.mk
index cdc5b52..efe46b8 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -150,6 +150,18 @@
     libbrotli \
     $(tune2fs_static_libraries)
 
+health_hal_static_libraries := \
+    android.hardware.health@2.0-impl \
+    android.hardware.health@2.0 \
+    android.hardware.health@1.0 \
+    android.hardware.health@1.0-convert \
+    libhealthstoragedefault \
+    libhidltransport \
+    libhidlbase \
+    libhwbinder_noltopgo \
+    libvndksupport \
+    libbatterymonitor
+
 librecovery_static_libraries := \
     librecovery \
     $(TARGET_RECOVERY_UI_LIB) \
@@ -160,8 +172,8 @@
     libminui \
     libverifier \
     libotautil \
+    $(health_hal_static_libraries) \
     libasyncio \
-    libbatterymonitor \
     libcrypto_utils \
     libcrypto \
     libext4_utils \
@@ -174,8 +186,8 @@
     libtinyxml2 \
     libziparchive \
     libbase \
-    libcutils \
     libutils \
+    libcutils \
     liblog \
     libselinux \
     libz \