Export TSAN_RUNTIME_LIBRARY make variable

TSAN_RUNTIME_LIBRARY is used by external/clang/Android.mk to get the
name of the per-arch TSAN runtime.  This CL also factors-out common code
out of functions that construct names of the sanitizer libraries.

Test: python external/clang/build.py with all CLs in this topic

Change-Id: Ie5fac242c0d5a9296ab8936db927a4c934061aa4
diff --git a/cc/makevars.go b/cc/makevars.go
index 200faff..dcde828 100644
--- a/cc/makevars.go
+++ b/cc/makevars.go
@@ -209,6 +209,7 @@
 		if target.Os.Class == android.Device {
 			ctx.Strict(secondPrefix+"ADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.AddressSanitizerRuntimeLibrary(toolchain), ".so"))
 			ctx.Strict(secondPrefix+"UBSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehaviorSanitizerRuntimeLibrary(toolchain), ".so"))
+			ctx.Strict(secondPrefix+"TSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.ThreadSanitizerRuntimeLibrary(toolchain), ".so"))
 		}
 
 		// This is used by external/gentoo/...