Implement Xz compressor functions.

The new XzCompress() function is similar to BzipCompress() function but
uses the Xz compression algorithm.

This patch simplifies the unittests of the compressors and reuses the
client-side decompresor implementation instead of repeating the
implementation in the delta generator. This patch removes the unused
compression/decompression functions.

Bug: 24578399
TEST=Added unittests.

Change-Id: Id858112b50f4aa2597f184dc23a86af772f4f190
diff --git a/Android.mk b/Android.mk
index 42617c8..d7ea020 100644
--- a/Android.mk
+++ b/Android.mk
@@ -552,6 +552,7 @@
 ue_libpayload_generator_exported_static_libraries := \
     libpayload_consumer \
     update_metadata-protos \
+    liblzma \
     $(ue_libpayload_consumer_exported_static_libraries) \
     $(ue_update_metadata_protos_exported_static_libraries)
 ue_libpayload_generator_exported_shared_libraries := \
@@ -580,7 +581,8 @@
     payload_generator/payload_signer.cc \
     payload_generator/raw_filesystem.cc \
     payload_generator/tarjan.cc \
-    payload_generator/topological_sort.cc
+    payload_generator/topological_sort.cc \
+    payload_generator/xz_android.cc
 
 ifeq ($(HOST_OS),linux)
 # Build for the host.
@@ -596,6 +598,7 @@
 LOCAL_STATIC_LIBRARIES := \
     libpayload_consumer \
     update_metadata-protos \
+    liblzma \
     $(ue_libpayload_consumer_exported_static_libraries) \
     $(ue_update_metadata_protos_exported_static_libraries)
 LOCAL_SHARED_LIBRARIES := \
@@ -620,6 +623,7 @@
 LOCAL_STATIC_LIBRARIES := \
     libpayload_consumer \
     update_metadata-protos \
+    liblzma \
     $(ue_libpayload_consumer_exported_static_libraries:-host=) \
     $(ue_update_metadata_protos_exported_static_libraries)
 LOCAL_SHARED_LIBRARIES := \