bionic-unit-tests: Build host testlibs in bionic-loader-test-libs

The target test libs are now all built in
nativetest/bionic-loader-test-libs. However, libs built using
libs/Android.build.testlib.mk are still put in lib/ on the host.

This commit refactors libs/Android.build.testlib*.mk so that all test
libs go into nativetest/bionic-loader-test-libs on the host; nothing
changes on the target. Android.build.mk now understands
*_install_to_native_tests_dir both for host and target builds.

Change-Id: I1022e9bab38bf53036c95fd39b3b240bcb31f23a
diff --git a/tests/libs/Android.build.testlib.target.mk b/tests/libs/Android.build.testlib.target.mk
index b79dbfc..5ec0d71 100644
--- a/tests/libs/Android.build.testlib.target.mk
+++ b/tests/libs/Android.build.testlib.target.mk
@@ -14,14 +14,6 @@
 # limitations under the License.
 #
 
+build_target := SHARED_LIBRARY
 build_type := target
-# 1. Install test libraries to /data/nativetests../bionic-loader-test-libs/
-#    by default.
-ifeq ($($(module)_relative_install_path),)
-  $(module)_install_to_out_data_dir := bionic-loader-test-libs
-else
-  $(module)_install_to_out_data_dir := bionic-loader-test-libs/$($(module)_relative_install_path)
-endif
-# 2. Set dt_runpath to origin to resolve dependencies
-$(module)_ldflags += -Wl,--rpath,\$${ORIGIN} -Wl,--enable-new-dtags
-include $(TEST_PATH)/Android.build.mk
+include $(LOCAL_PATH)/Android.build.testlib.internal.mk