[libcxxabi] Add support for running libc++abi tests with sanitizers

Summary: Add support for LLVM_USE_SANITIZER to the libc++abi tests. Currently, if libc++abi is configured with LLVM_USE_SANITIZER then none of the tests will pass.

Reviewers: jroelofs, mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@220464 91177308-0d34-0410-b5e6-96231b3b80d8
Only link the tests against -ldl on linux

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@220509 91177308-0d34-0410-b5e6-96231b3b80d8
Change uses of `sys.platform == 'linux2' to `sys.platform.startswith('linux')

Although the current method is valid up till python 3.3 (which is not supported)
this seems to be a clearer way of checking for linux and moves the tests towards
python 3 compatibility.

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