[MEDIUM] minor update to the task api: let the scheduler queue itself

All the tasks callbacks had to requeue the task themselves, and update
a global timeout. This was not convenient at all. Now the API has been
simplified. The tasks callbacks only have to update their expire timer,
and return either a pointer to the task or NULL if the task has been
deleted. The scheduler will take care of requeuing the task at the
proper place in the wait queue.
diff --git a/include/common/appsession.h b/include/common/appsession.h
index 616766f..6c12926 100644
--- a/include/common/appsession.h
+++ b/include/common/appsession.h
@@ -38,7 +38,7 @@
 /* Callback for destroy */
 void destroy(appsess *data);
 
-void appsession_refresh(struct task *t, int *next);
+struct task *appsession_refresh(struct task *t);
 int appsession_task_init(void);
 int appsession_init(void);
 void appsession_cleanup(void);