Implement LOCAL_COMPRESSED_MODULE.

- Prebuilts with LOCAL_MODULE_CLASS == APPS and BUILD_PACKAGE that
  define LOCAL_COMPRESSED_MODULE := true will be installed compressed
  in the system partition.
- The compression algorithm is simple gzip for now.

In addition :
- Compressed modules are not dex-preopted.
- JNI shared libraries are always embedded inside compressed modules,
  they are never installed as separate files on the FS.

Test: Manual
Bug: 63802184

Change-Id: Id12b1ff0b1d68791ec1178783f7e78910e122a33
diff --git a/core/install_jni_libs.mk b/core/install_jni_libs.mk
index 6b550c1..e88db40 100644
--- a/core/install_jni_libs.mk
+++ b/core/install_jni_libs.mk
@@ -32,6 +32,11 @@
     my_embed_jni := true
   endif
 endif
+# If we're installing this APP as a compressed module, we include all JNI libraries
+# in the compressed artifact, rather than as separate files on the partition in question.
+ifdef LOCAL_COMPRESSED_MODULE
+my_embed_jni := true
+endif
 
 jni_shared_libraries :=
 jni_shared_libraries_abis :=