MINOR: threads: add a MAX_THREADS define instead of LONGBITS

This one allows not to inflate some structures when threads are
disabled. Now struct global is 1.4 kB instead of 33 kB.

Should be backported to 1.8 for ease of backporting of upcoming
patches.
diff --git a/include/common/hathreads.h b/include/common/hathreads.h
index 5f0b969..f819536 100644
--- a/include/common/hathreads.h
+++ b/include/common/hathreads.h
@@ -30,6 +30,8 @@
 
 #ifndef USE_THREAD
 
+#define MAX_THREADS 1
+
 #define __decl_hathreads(decl)
 
 #define HA_ATOMIC_CAS(val, old, new) ({((*val) == (*old)) ? (*(val) = (new) , 1) : (*(old) = *(val), 0);})
@@ -95,6 +97,8 @@
 #include <pthread.h>
 #include <import/plock.h>
 
+#define MAX_THREADS LONGBITS
+
 #define __decl_hathreads(decl) decl
 
 /* TODO: thread: For now, we rely on GCC builtins but it could be a good idea to
diff --git a/include/types/global.h b/include/types/global.h
index 6f3fedc..5c5cf73 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -168,7 +168,7 @@
 #ifdef USE_CPU_AFFINITY
 	struct {
 		unsigned long proc[LONGBITS];             /* list of CPU masks for the 32/64 first processes */
-		unsigned long thread[LONGBITS][LONGBITS]; /* list of CPU masks for the 32/64 first threads per process */
+		unsigned long thread[LONGBITS][MAX_THREADS]; /* list of CPU masks for the 32/64 first threads per process */
 	} cpu_map;
 #endif
 };