Support preload of org.apache.http.legacy.jar

This library is still referenced by most (~70%) of the most commonly
used Android apps, and preloading yields modest improvements to both
app startup latency and memory, particularly for lower-end devices.

Add support for preloading the library behind a new flag:
  com.android.internal.os.enable_apache_http_legacy_preload

Bug: 241474956
Test: m + ART benchmark service
Test: atest FrameworksCoreTests:android.app.ApplicationLoadersTest
Flag: com.android.internal.os.enable_apache_http_legacy_preload
Change-Id: Iff97a0a78d9b4c12da963d252574a0a9bd8dd87d
4 files changed