android: Add android_app_bundle GN template.

This CL adds a new public template named android_app_bundle()
that can be used to generate an Android App Bundle [1] that
maps the content of an existing base APK (plus optional additional
feature modules).

IMPORTANT: Language-based splits are disabled for now
           (see http://crbug.com/846633 for details).

For now, this relies on the latest aapt2 and bundletool-all.jar
binaries in a directory specified throug the GN args variable
android_sdk_app_bundle_build_tools. This requirement will be
lifted once these binaries are properly rolled out in the Chromium
source tree (tracked by http://crbug.com/845405).

This also adds a few new GN targets to build some bundles, as
well as ".apks" files, which are zip archives containing several
APK splits + some configuration data.

  chrome_public_bundle
    ($OUT/gen/chrome/android/chrome_public_bundle.aab)

  chrome_public_bundle_apks
    ($OUT/gen/chrome/android/chrome_public_bundle.apks)

  chrome_modern_public_bundle
    ($OUT/gen/chrome/android/chrome_modern_public_bundle.aab)

  monochrome_public_bundle
    ($OUT/gen/chrome/android/monochrome_public_bundle.aab)

To install the .apks on a local device, use the following:

  build/android/gyp/bundletool.py install-apks \
    --apks=out/Release/gen/chrome/android/chrome_public_bundle.apks \
    --adb=$(which adb)

+ Fix resource extraction logic to recognize when the .pak files
  are stored in APK splits with asset-targeting directories.

BUG=820459
R=​benmason@chromium.org,agrieve@chromium.org,yfriedman@chromium.org,tedchoc@chromium.org,dtrainor@chromium.org

Change-Id: Iaf63985e5e955ad97403ad4c938b8471a0128fee
Reviewed-on: https://chromium-review.googlesource.com/1124904
Reviewed-by: Ben Mason <benmason@chromium.org>
Cr-Commit-Position: refs/branch-heads/3474@{#5}
Cr-Branched-From: e3d2bf14a3ded568e72df70feac71980d34da10c-refs/heads/master@{#570647}
13 files changed