MEDIUM: tasks: Merge task_delete() and task_free() into task_destroy().

task_delete() was never used without calling task_free() just after, and
task_free() was only used on error pathes to destroy a just-created task,
so merge them into task_destroy(), that will remove the task from the
wait queue, and make sure the task is either destroyed immediately if it's
not in the run queue, or destroyed when it's supposed to run.
diff --git a/src/hlua.c b/src/hlua.c
index 98c434a..ff5ffba 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -6185,8 +6185,7 @@
 	/* finished or yield */
 	case HLUA_E_OK:
 		hlua_ctx_destroy(hlua);
-		task_delete(task);
-		task_free(task);
+		task_destroy(task);
 		task = NULL;
 		break;
 
@@ -6199,8 +6198,7 @@
 	case HLUA_E_ERRMSG:
 		SEND_ERR(NULL, "Lua task: %s.\n", lua_tostring(hlua->T, -1));
 		hlua_ctx_destroy(hlua);
-		task_delete(task);
-		task_free(task);
+		task_destroy(task);
 		task = NULL;
 		break;
 
@@ -6208,8 +6206,7 @@
 	default:
 		SEND_ERR(NULL, "Lua task: unknown error.\n");
 		hlua_ctx_destroy(hlua);
-		task_delete(task);
-		task_free(task);
+		task_destroy(task);
 		task = NULL;
 		break;
 	}
@@ -7052,8 +7049,7 @@
 
 static void hlua_applet_tcp_release(struct appctx *ctx)
 {
-	task_delete(ctx->ctx.hlua_apptcp.task);
-	task_free(ctx->ctx.hlua_apptcp.task);
+	task_destroy(ctx->ctx.hlua_apptcp.task);
 	ctx->ctx.hlua_apptcp.task = NULL;
 	hlua_ctx_destroy(ctx->ctx.hlua_apptcp.hlua);
 	ctx->ctx.hlua_apptcp.hlua = NULL;
@@ -7520,8 +7516,7 @@
 
 static void hlua_applet_http_release(struct appctx *ctx)
 {
-	task_delete(ctx->ctx.hlua_apphttp.task);
-	task_free(ctx->ctx.hlua_apphttp.task);
+	task_destroy(ctx->ctx.hlua_apphttp.task);
 	ctx->ctx.hlua_apphttp.task = NULL;
 	hlua_ctx_destroy(ctx->ctx.hlua_apphttp.hlua);
 	ctx->ctx.hlua_apphttp.hlua = NULL;