MINOR: task: don't set TASK_RUNNING on tasklets

We can't clear flags on tasklets because we don't know if they're still
present upon return (they all return NULL, maybe that could change in
the future). As a side effect, once TASK_RUNNING is set, it's never
cleared anymore, which is misleading and resulted in some incorrect
flagging of bulk tasks in the recent scheduler changes. And the only
reason for setting TASK_RUNNING on tasklets was to detect self-wakers,
which is not done using a dedicated flag. So instead of setting this
flags for no opportunity to clear it, let's simply not set it.
diff --git a/src/task.c b/src/task.c
index 5921c01..319ae93 100644
--- a/src/task.c
+++ b/src/task.c
@@ -329,10 +329,7 @@
 
 	while (done < max && !LIST_ISEMPTY(list)) {
 		t = (struct task *)LIST_ELEM(list->n, struct tasklet *, list);
-		state = (t->state & (TASK_SHARED_WQ|TASK_SELF_WAKING)) | TASK_RUNNING;
-		state = _HA_ATOMIC_XCHG(&t->state, state);
-		__ha_barrier_atomic_store();
-		__tasklet_remove_from_tasklet_list((struct tasklet *)t);
+		state = (t->state & (TASK_SHARED_WQ|TASK_SELF_WAKING));
 
 		ti->flags &= ~TI_FL_STUCK; // this thread is still running
 		activity[tid].ctxsw++;
@@ -342,6 +339,9 @@
 		sched->current = t;
 
 		if (TASK_IS_TASKLET(t)) {
+			state = _HA_ATOMIC_XCHG(&t->state, state);
+			__ha_barrier_atomic_store();
+			__tasklet_remove_from_tasklet_list((struct tasklet *)t);
 			process(NULL, ctx, state);
 			done++;
 			sched->current = NULL;
@@ -349,6 +349,10 @@
 			continue;
 		}
 
+		state = _HA_ATOMIC_XCHG(&t->state, state | TASK_RUNNING);
+		__ha_barrier_atomic_store();
+		__tasklet_remove_from_tasklet_list((struct tasklet *)t);
+
 		/* OK then this is a regular task */
 
 		task_per_thread[tid].task_list_size--;