[MINOR] task: keep a task count and clean up task creators

It's sometimes useful at least for statistics to keep a task count.
It's easy to do by forcing the rare task creators to always use the
same functions to create/destroy a task.
diff --git a/src/checks.c b/src/checks.c
index f1e8120..50b464f 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -837,14 +837,12 @@
 			if (!(s->state & SRV_CHECKED))
 				continue;
 
-			if ((t = pool_alloc2(pool2_task)) == NULL) {
+			if ((t = task_new()) == NULL) {
 				Alert("Starting [%s:%s] check: out of memory.\n", px->id, s->id);
 				return -1;
 			}
 
 			s->check = t;
-
-			task_init(t);
 			t->process = process_chk;
 			t->context = s;