MEDIUM: threads/server: Add a lock per server and atomically update server vars

The server's lock is use, among other things, to lock acces to the active
connection list of a server.
diff --git a/include/types/server.h b/include/types/server.h
index ecf04d7..31fb76f 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -32,6 +32,8 @@
 
 #include <common/config.h>
 #include <common/mini-clist.h>
+#include <common/hathreads.h>
+
 #include <eb32tree.h>
 
 #include <types/connection.h>
@@ -283,6 +285,10 @@
 		struct sample_expr *sni;        /* sample expression for SNI */
 	} ssl_ctx;
 #endif
+
+#ifdef USE_THREAD
+	HA_SPINLOCK_T lock;
+#endif
 	struct {
 		const char *file;		/* file where the section appears */
 		int line;			/* line where the section appears */