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/proto/server.h b/include/proto/server.h
index f52b38e..5a2fcc9 100644
--- a/include/proto/server.h
+++ b/include/proto/server.h
@@ -41,7 +41,7 @@
 extern struct eb_root idle_conn_srv;
 extern struct task *idle_conn_task;
 extern struct task *idle_conn_cleanup[MAX_THREADS];
-extern struct list toremove_connections[MAX_THREADS];
+extern struct mt_list toremove_connections[MAX_THREADS];
 
 int srv_downtime(const struct server *s);
 int srv_lastsession(const struct server *s);
@@ -262,7 +262,7 @@
 			return 0;
 		}
 		LIST_DEL(&conn->list);
-		LIST_ADDQ_LOCKED(&srv->idle_orphan_conns[tid], &conn->list);
+		MT_LIST_ADDQ(&srv->idle_orphan_conns[tid], (struct mt_list *)&conn->list);
 		srv->curr_idle_thr[tid]++;
 
 		conn->idle_time = now_ms;