[Sanitizer] Change driver behavior when linking with -fsanitize=thread and -fsanitize=memory. TSan/MSan also provide their versions of new/delete and should use the same strategy as ASan. Share the code that sets linker flags for all sanitizers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176178 91177308-0d34-0410-b5e6-96231b3b80d8