MINOR: activity: flush scheduler stats on "set profiling tasks on"

If a user enables profiling by hand, it makes sense to reset the stats
counters to provide fresh new measurements. Therefore it's worth using
this as the standard method to reset counters.
diff --git a/src/activity.c b/src/activity.c
index e0e6693..ffad370 100644
--- a/src/activity.c
+++ b/src/activity.c
@@ -72,8 +72,17 @@
 
 	if (strcmp(args[3], "on") == 0) {
 		unsigned int old = profiling;
+		int i;
+
 		while (!_HA_ATOMIC_CAS(&profiling, &old, (old & ~HA_PROF_TASKS_MASK) | HA_PROF_TASKS_ON))
 			;
+		/* also flush current profiling stats */
+		for (i = 0; i < 256; i++) {
+			HA_ATOMIC_STORE(&sched_activity[i].calls, 0);
+			HA_ATOMIC_STORE(&sched_activity[i].cpu_time, 0);
+			HA_ATOMIC_STORE(&sched_activity[i].lat_time, 0);
+			HA_ATOMIC_STORE(&sched_activity[i].func, NULL);
+		}
 	}
 	else if (strcmp(args[3], "auto") == 0) {
 		unsigned int old = profiling;