When COMPILER_RT_INTERCEPT_LIBDISPATCH is ON the TSan runtime library
now has a dependency on the blocks runtime and libdispatch. Make sure we
set all the required linking options.
Also add cmake options for specifying additional library paths to
instruct the linker where to search for libdispatch and the blocks
runtime. This allows us to build TSan runtime with libdispatch support
without installing those libraries into default linker library paths.
CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY is necessary to avoid
aborting the build due to failing the link step in CMake's
check_c_compiler test.
FYI, this isn't safe to do. CMAKE_TRY_COMPILE_TARGET_TYPE was added in CMake 3.6, and LLVM and Compiler-RT support building with CMake 3.4 and up.