[libcxx] Don't assume __libcpp_thread_t is an integral type

We have already refactored the underlying platform thread type into
__libcpp_thread_t, but there are few places in the source where we
still assume it is an integral type.

This patch refactores those points back into the threading API.

Differential revision: https://reviews.llvm.org/D28608

Reviewers: EricWF
llvm-svn: 292107
2 files changed