Suppress vdex madvise calls for metadata access

The vdex madvise calls were made to improve app startup. However, vdex
files can also be loaded in other scenarios, like when system_server
queries the dex optimization status for various packages during app
transitions, or during a global dumpsys. Avoid calling madvise in such
situations, as it incurs unnecessary latency/memory overhead.

A follow-up CL will consolidate the different dex and vdex madvise
paths; much of the dex madvise behavior was conditioned on 512MB
Go devices, and is no longer actively used.

Test: Verified madvise only called on app startup, and not from
    deprecated calls to DexFile opt status queries from system_server.
Bug: 195793112
Change-Id: I715af7f34b31f2e9060f3d3d57a2a3171f01187b
2 files changed