MEDIUM: list: Separate "locked" list from regular list.

Instead of using the same type for regular linked lists and "autolocked"
linked lists, use a separate type, "struct mt_list", for the autolocked one,
and introduce a set of macros, similar to the LIST_* macros, with the
MT_ prefix.
When we use the same entry for both regular list and autolocked list, as
is done for the "list" field in struct connection, we know have to explicitely
cast it to struct mt_list when using MT_ macros.
diff --git a/include/types/global.h b/include/types/global.h
index bd08db1..e9cbf3f 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -240,7 +240,7 @@
 extern int killed;	/* >0 means a hard-stop is triggered, >1 means hard-stop immediately */
 extern char hostname[MAX_HOSTNAME_LEN];
 extern char localpeer[MAX_HOSTNAME_LEN];
-extern struct list global_listener_queue; /* list of the temporarily limited listeners */
+extern struct mt_list global_listener_queue; /* list of the temporarily limited listeners */
 extern struct task *global_listener_queue_task;
 extern unsigned int warned;     /* bitfield of a few warnings to emit just once */
 extern volatile unsigned long sleeping_thread_mask;
diff --git a/include/types/listener.h b/include/types/listener.h
index def48b0..e60d91c 100644
--- a/include/types/listener.h
+++ b/include/types/listener.h
@@ -202,7 +202,7 @@
 	int (*accept)(struct listener *l, int fd, struct sockaddr_storage *addr); /* upper layer's accept() */
 	enum obj_type *default_target;  /* default target to use for accepted sessions or NULL */
 	/* cache line boundary */
-	struct list wait_queue;		/* link element to make the listener wait for something (LI_LIMITED)  */
+	struct mt_list wait_queue;	/* link element to make the listener wait for something (LI_LIMITED)  */
 	unsigned int thr_idx;           /* thread indexes for queue distribution : (t2<<16)+t1 */
 	unsigned int analysers;		/* bitmap of required protocol analysers */
 	int maxseg;			/* for TCP, advertised MSS */
diff --git a/include/types/proxy.h b/include/types/proxy.h
index 87b85ad..6ea96b3 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -415,7 +415,7 @@
 	struct be_counters be_counters;		/* backend statistics counters */
 	struct fe_counters fe_counters;		/* frontend statistics counters */
 
-	struct list listener_queue;		/* list of the temporarily limited listeners because of lack of a proxy resource */
+	struct mt_list listener_queue;		/* list of the temporarily limited listeners because of lack of a proxy resource */
 	struct stktable *table;			/* table for storing sticking streams */
 
 	struct task *task;			/* the associated task, mandatory to manage rate limiting, stopping and resource shortage, NULL if disabled */
diff --git a/include/types/server.h b/include/types/server.h
index a71f806..842e033 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -223,7 +223,7 @@
 	struct list *priv_conns;		/* private idle connections attached to stream interfaces */
 	struct list *idle_conns;		/* sharable idle connections attached or not to a stream interface */
 	struct list *safe_conns;		/* safe idle connections attached to stream interfaces, shared */
-	struct list *idle_orphan_conns;         /* Orphan connections idling */
+	struct mt_list *idle_orphan_conns;         /* Orphan connections idling */
 	unsigned int pool_purge_delay;          /* Delay before starting to purge the idle conns pool */
 	unsigned int max_idle_conns;            /* Max number of connection allowed in the orphan connections list */
 	unsigned int curr_idle_conns;           /* Current number of orphan idling connections */
diff --git a/include/types/task.h b/include/types/task.h
index 3421cd3..481d563 100644
--- a/include/types/task.h
+++ b/include/types/task.h
@@ -118,7 +118,7 @@
  * TASK_WOKEN_OTHER and a context pointing to the work_list entry.
  */
 struct work_list {
-	struct list head;
+	struct mt_list head;
 	struct task *task;
 	void *arg;
 };