MAJOR: poll: only rely on wake_expired_tasks() to compute the wait delay

Actually, HAProxy uses the function "process_runnable_tasks" and
"wake_expired_tasks" to get the next task which can expires.

If a task is added with "task_schedule" or other method during
the execution of an other task, the expiration of this new task
is not taken into account, and the execution of this task can be
too late.

Actualy, HAProxy seems to be no sensitive to this bug.

This fix moves the call to process_runnable_tasks() before the timeout
calculation and ensures that all wakeups are processed together. Only
wake_expired_tasks() needs to return a timeout now.
diff --git a/src/haproxy.c b/src/haproxy.c
index c5ffa0f..f50deff 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -1459,14 +1459,14 @@
 
 	tv_update_date(0,1);
 	while (1) {
+		/* Process a few tasks */
+		process_runnable_tasks();
+
 		/* check if we caught some signals and process them */
 		signal_process_queue();
 
 		/* Check if we can expire some tasks */
-		wake_expired_tasks(&next);
-
-		/* Process a few tasks */
-		process_runnable_tasks(&next);
+		next = wake_expired_tasks();
 
 		/* stop when there's nothing left to do */
 		if (jobs == 0)