Undo giving full access to system libs from other system libs.

Directly extending the search path to /system/${LIB} for system APKs
may result in system libs being loaded in an app classloader namespace
rather than the system namespace. If those libs then depend on other
non-public libraries, e.g. in APEXes, that are only accessible through
links from the system namespace, then those dependencies will fail to
load because the app classloader namespace doesn't have the same links.

This CL functionally undoes https://r.android.com/2211602, but only
disables tests that break, and adds some tests to exercise the
situation above.

Also change native libs in the test to use `min_sdk_version` rather
than `sdk_version`, because now when they contain code they need an
NDK, and one with exactly version 31 is normally not available in the
build. (Otoh, the java libraries with `product_specific: true` or
`vendor: true` aren't allowed to use `min_sdk_version`.)

Test: atest -a libnativeloader_test libnativeloader_lazy_test \
        libnativeloader_e2e_tests
Bug: 258340826
Bug: 237577392
Change-Id: I95a3fbc6c8021c037fffda1423aa90c62973ec89
14 files changed