Fix the pthread_setname_np test.

Fix the pthread_setname_np test to take into account that emulator kernels are
so old that they don't support setting the name of other threads.

The CLONE_DETACHED thread is obsolete since 2.5 kernels.

Rename kernel_id to tid.

Fix the signature of __pthread_clone.

Clean up the clone and pthread_setname_np implementations slightly.

Change-Id: I16c2ff8845b67530544bbda9aa6618058603066d
diff --git a/libc/bionic/bionic_clone.c b/libc/bionic/bionic_clone.c
index 187b60d..8412057 100644
--- a/libc/bionic/bionic_clone.c
+++ b/libc/bionic/bionic_clone.c
@@ -58,9 +58,8 @@
     int     *parent_tidptr = NULL;
     void    *new_tls = NULL;
     int     *child_tidptr = NULL;
-    int     ret;
 
-    /* extract optional parameters - they are cummulative */
+    /* extract optional parameters - they are cumulative. */
     va_start(args, arg);
     if (flags & (CLONE_PARENT_SETTID|CLONE_SETTLS|CLONE_CHILD_SETTID)) {
         parent_tidptr = va_arg(args, int*);
@@ -73,6 +72,5 @@
     }
     va_end(args);
 
-    ret = __bionic_clone(flags, child_stack, parent_tidptr, new_tls, child_tidptr, fn, arg);
-    return ret;
+    return __bionic_clone(flags, child_stack, parent_tidptr, new_tls, child_tidptr, fn, arg);
 }