Android.mk: Sort library dependencies.

The order of the library dependencies in the makefile is important,
since the dependencies should be listed after the libraries using them
are listed.

This patch sorts the libraries in the Android.mk to match the order in
which their equivalent library dependencies are included in the .gyp
file. It also completes the transitive dependencies between targets as
described by the exported deps in the .gyp file.

Bug: None
Test: mmma system/update_engine

Change-Id: Iaa5bd471919902de9c2646502ff9f918bc9a144a
diff --git a/Android.mk b/Android.mk
index a1edf1c..9755896 100644
--- a/Android.mk
+++ b/Android.mk
@@ -106,20 +106,20 @@
     update_engine-dbus-adaptor \
     update_engine-dbus-libcros-client \
     update_engine_client-dbus-proxies \
+    libxz \
     libbz \
-    libfs_mgr \
-    libxz
+    libfs_mgr
 LOCAL_SHARED_LIBRARIES += \
     libprotobuf-cpp-lite-rtti \
     libdbus \
     libcrypto \
     libcurl \
-    libcutils \
-    libhardware \
     libmetrics \
     libssl \
     libexpat \
-    libchromeos-policy
+    libchromeos-policy \
+    libhardware \
+    libcutils
 LOCAL_SRC_FILES := \
     action_processor.cc \
     boot_control_android.cc \
@@ -194,22 +194,22 @@
     libupdate_engine \
     libbz \
     libfs_mgr \
-    libxz \
     update_metadata-protos \
     update_engine-dbus-adaptor \
     update_engine-dbus-libcros-client \
-    update_engine_client-dbus-proxies
+    update_engine_client-dbus-proxies \
+    libxz
 LOCAL_SHARED_LIBRARIES += \
     libprotobuf-cpp-lite-rtti \
     libdbus \
     libcrypto \
     libcurl \
-    libcutils \
-    libhardware \
     libmetrics \
     libssl \
     libexpat \
-    libchromeos-policy
+    libchromeos-policy \
+    libhardware \
+    libcutils
 LOCAL_SRC_FILES := \
     main.cc
 LOCAL_INIT_RC := update_engine.rc
@@ -242,11 +242,11 @@
     libupdate_engine \
     libbz \
     libfs_mgr \
-    libxz \
     update_metadata-protos \
     update_engine-dbus-adaptor \
     update_engine-dbus-libcros-client \
     update_engine_client-dbus-proxies \
+    libxz \
     update_metadata-protos
 LOCAL_SHARED_LIBRARIES += \
     libdbus \
@@ -256,6 +256,8 @@
     libssl \
     libexpat \
     libchromeos-policy \
+    libhardware \
+    libcutils \
     libprotobuf-cpp-lite-rtti \
     libext2fs
 LOCAL_SRC_FILES := \
@@ -293,11 +295,11 @@
     libupdate_engine \
     libbz \
     libfs_mgr \
-    libxz \
     update_metadata-protos \
     update_engine-dbus-adaptor \
     update_engine-dbus-libcros-client \
-    update_engine_client-dbus-proxies
+    update_engine_client-dbus-proxies \
+    libxz
 LOCAL_SHARED_LIBRARIES += \
     libdbus \
     libcrypto \
@@ -306,6 +308,8 @@
     libssl \
     libexpat \
     libchromeos-policy \
+    libhardware \
+    libcutils \
     libprotobuf-cpp-lite-rtti \
     libext2fs
 LOCAL_SRC_FILES := \