MEDIUM: task: extend the state field to 32 bits

It's been too short for quite a while now and is now full. It's still
time to extend it to 32-bits since we have room for this without
wasting any space, so we now gained 16 new bits for future flags.

The values were not reassigned just in case there would be a few
hidden u16 or short somewhere in which these flags are placed (as
it used to be the case with stream->pending_events).

The patch is tagged MEDIUM because this required to update the task's
process() prototype to use an int instead of a short, that's quite a
bunch of places.
diff --git a/src/task.c b/src/task.c
index 350146d..a99d30a 100644
--- a/src/task.c
+++ b/src/task.c
@@ -64,7 +64,7 @@
  */
 void task_kill(struct task *t)
 {
-	unsigned short state = t->state;
+	unsigned int state = t->state;
 	unsigned int thr;
 
 	BUG_ON(state & TASK_KILLED);
@@ -433,14 +433,14 @@
  */
 unsigned int run_tasks_from_lists(unsigned int budgets[])
 {
-	struct task *(*process)(struct task *t, void *ctx, unsigned short state);
+	struct task *(*process)(struct task *t, void *ctx, unsigned int state);
 	struct list *tl_queues = sched->tasklets;
 	struct task *t;
 	uint8_t budget_mask = (1 << TL_CLASSES) - 1;
 	struct sched_activity *profile_entry = NULL;
 	unsigned int done = 0;
 	unsigned int queue;
-	unsigned short state;
+	unsigned int state;
 	void *ctx;
 
 	for (queue = 0; queue < TL_CLASSES;) {
@@ -806,7 +806,7 @@
  * is returned on success, otherwise NULL on failure.
  */
 struct work_list *work_list_create(int nbthread,
-                                   struct task *(*fct)(struct task *, void *, unsigned short),
+                                   struct task *(*fct)(struct task *, void *, unsigned int),
                                    void *arg)
 {
 	struct work_list *wl;