Remove libbacktrace definition of gettid.

Also simplifies the Darwin implementation of gettid, because
apparently libbacktrace had a better way of doing it.

Bug: 19517541

(cherry picked from commit 23f750b068ddf5b20fb5d153a798b22562368992)

Change-Id: I2f888e8ed7a2f5719973786cbcbb399a81867ee9
diff --git a/libcutils/threads.c b/libcutils/threads.c
index 3d8dd48..036f8c5 100644
--- a/libcutils/threads.c
+++ b/libcutils/threads.c
@@ -35,12 +35,7 @@
 #ifndef __ANDROID__
 pid_t gettid() {
 #if defined(__APPLE__)
-  uint64_t owner;
-  int rc = pthread_threadid_np(NULL, &owner);
-  if (rc != 0) {
-    abort();
-  }
-  return owner;
+  return syscall(SYS_thread_selfid);
 #elif defined(__linux__)
   return syscall(__NR_gettid);
 #elif defined(_WIN32)