Fix cpu_set_t

- extend CPU_SETSIZE for LP64
- fix CPU_(AND|OR|XOR) macros
- fix CPU_OP_S macro
- fix __sched_cpucount
- tidy up the code

Change-Id: I741afff4d0c473e8a1ee6b4141981dc24467e0d4
diff --git a/libc/bionic/sched_cpucount.c b/libc/bionic/sched_cpucount.c
index 9458dc8..2ea1d3f 100644
--- a/libc/bionic/sched_cpucount.c
+++ b/libc/bionic/sched_cpucount.c
@@ -28,13 +28,14 @@
 #define _GNU_SOURCE 1
 #include <sched.h>
 
-int __sched_cpucount(size_t setsize, cpu_set_t* set)
-{
-    int nn = 0, nn_max = setsize / sizeof(__CPU_BITTYPE);
-    int count = 0;
+int __sched_cpucount(size_t setsize, cpu_set_t* set) {
+  int nn = 0;
+  int nn_max = setsize / sizeof(__CPU_BITTYPE);
+  int count = 0;
 
-    for ( ; nn < nn_max; nn++ )
-        count += __builtin_popcount(set->__bits[nn]);
+  for ( ; nn < nn_max; nn++ ) {
+    count += __builtin_popcountl(set->__bits[nn]);
+  }
 
-    return count;
+  return count;
 }