[MAJOR] replace the wait-queue linked list with an rbtree.

This patch from Sin Yu makes use of an rbtree for the wait queue,
which will solve the slowdown problem encountered when timeouts
are heterogenous in the configuration. The next step will be to
turn maintain_proxies() into a per-proxy task so that we won't
have to scan them all after each poll() loop.
diff --git a/src/haproxy.c b/src/haproxy.c
index 0471364..4a30357 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -255,12 +255,13 @@
 
 void dump(int sig)
 {
-	struct task *t, *tnext;
+	struct task *t;
 	struct session *s;
+	struct rb_node *node;
 
-	tnext = ((struct task *)LIST_HEAD(wait_queue[0]))->next;
-	while ((t = tnext) != LIST_HEAD(wait_queue[0])) { /* we haven't looped ? */
-		tnext = t->next;
+	for(node = rb_first(&wait_queue[0]);
+		node != NULL; node = rb_next(node)) {
+		t = rb_entry(node, struct task, rb_node);
 		s = t->context;
 		qfprintf(stderr,"[dump] wq: task %p, still %ld ms, "
 			 "cli=%d, srv=%d, cr=%d, cw=%d, sr=%d, sw=%d, "