Link libnativeloader statically into gtests.

It needs to be statically linked together with the rest of the runtime
since it uses internal APIs, like android::IsNamespaceNativeBridged
from art/runtime/jni/jni_internal.cc.

This moves the RUNPATH entries from libnativeloader.so to the test
binaries, and the path is adjusted to account for the binary location
.../testcases/art_<something>_tests/<arch>/<test binary> relative to
.../testcases/art_common.

Test: atest art_compiler_tests art_libartbase_tests art_runtime_tests
  on host and target in CI
Bug: 247108425
Change-Id: Ifbcc21a2746446b3d6434c73e20675602bb164b1
3 files changed