CMake: build DLLs in the right directory and include them in the 'install' target (PR21719)

When CMake builds a dynamic library on Windows, the .dll file's location is
determined by the RUNTIME_OUTPUT_DIRECTORY, which we were previously not
setting.

This means for example that clang_rt.asan_dynamic-i386.dll will get built
and installed in the same directory as the corresponding .lib file,
instead of being built in the bin/ directory and not installed at all.

Differential Revision: http://reviews.llvm.org/D6508

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223387 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan, LSan] Improve tracking of thread creation.

In the current scheme of things, the call to ThreadStart() in the child
thread is not synchronized with the parent thread. So, if a pointer is passed to
pthread_create, there may be a window of time during which this pointer will not
be discoverable by LSan. I.e. the pthread_create interceptor has already
returneed and thus the pointer is no longer on the parent stack, but we don't
yet know the location of the child stack. This has caused bogus leak reports
(see http://llvm.org/bugs/show_bug.cgi?id=21621/).

This patch makes the pthread_create interceptor wait until the child thread is
properly registered before returning.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223419 91177308-0d34-0410-b5e6-96231b3b80d8
internal_stat for mips64