CLEANUP: tree-wide: replace free(x);x=NULL with ha_free(&x)

This makes the code more readable and less prone to copy-paste errors.
In addition, it allows to place some __builtin_constant_p() predicates
to trigger a link-time error in case the compiler knows that the freed
area is constant. It will also produce compile-time error if trying to
free something that is not a regular pointer (e.g. a function).

The DEBUG_MEM_STATS macro now also defines an instance for ha_free()
so that all these calls can be checked.

178 occurrences were converted. The vast majority of them were handled
by the following Coccinelle script, some slightly refined to better deal
with "&*x" or with long lines:

  @ rule @
  expression E;
  @@
  - free(E);
  - E = NULL;
  + ha_free(&E);

It was verified that the resulting code is the same, more or less a
handful of cases where the compiler optimized slightly differently
the temporary variable that holds the copy of the pointer.

A non-negligible amount of {free(str);str=NULL;str_len=0;} are still
present in the config part (mostly header names in proxies). These
ones should also be cleaned for the same reasons, and probably be
turned into ist strings.
diff --git a/src/http_htx.c b/src/http_htx.c
index e2e6ce1..cf536a3 100644
--- a/src/http_htx.c
+++ b/src/http_htx.c
@@ -1009,8 +1009,7 @@
 	if (!http_reply)
 		return;
 
-	free(http_reply->ctype);
-	http_reply->ctype = NULL;
+	ha_free(&http_reply->ctype);
 	list_for_each_entry_safe(hdr, hdrb, &http_reply->hdrs, list) {
 		LIST_DEL(&hdr->list);
 		list_for_each_entry_safe(lf, lfb, &hdr->value, list) {
@@ -1024,8 +1023,7 @@
 	}
 
 	if (http_reply->type == HTTP_REPLY_ERRFILES) {
-		free(http_reply->body.http_errors);
-		http_reply->body.http_errors = NULL;
+		ha_free(&http_reply->body.http_errors);
 	}
 	else if (http_reply->type == HTTP_REPLY_RAW)
 		chunk_destroy(&http_reply->body.obj);
@@ -1067,8 +1065,7 @@
 		}
 
 		/* Reset errmsg */
-		free(errmsg);
-		errmsg = NULL;
+		ha_free(&errmsg);
 
 		http_err_chunks[rc] = chk;
 		http_err_replies[rc].type = HTTP_REPLY_ERRMSG;
@@ -1627,8 +1624,7 @@
 			ha_warning("parsing [%s:%d] : content-type '%s' ignored by the http reply because"
 				   " neither errorfile nor payload defined.\n",
 				   px->conf.args.file, px->conf.args.line, reply->ctype);
-			free(reply->ctype);
-			reply->ctype = NULL;
+			ha_free(&reply->ctype);
 		}
 	}
 	else if (reply->type == HTTP_REPLY_ERRFILES || reply->type == HTTP_REPLY_ERRMSG) { /* errorfiles or errorfile */
@@ -1653,8 +1649,7 @@
 			ha_warning("parsing [%s:%d] : content-type '%s' ignored by the http reply when used "
 				   "with an erorrfile.\n",
 				   px->conf.args.file, px->conf.args.line, reply->ctype);
-			free(reply->ctype);
-			reply->ctype = NULL;
+			ha_free(&reply->ctype);
 		}
 		if (!LIST_ISEMPTY(&reply->hdrs)) {
 			ha_warning("parsing [%s:%d] : hdr parameters ignored by the http reply when used "
@@ -1686,8 +1681,7 @@
 			ha_warning("parsing [%s:%d] : content-type '%s' ignored by the http reply when used "
 				   "with an empty payload.\n",
 				   px->conf.args.file, px->conf.args.line, reply->ctype);
-			free(reply->ctype);
-			reply->ctype = NULL;
+			ha_free(&reply->ctype);
 		}
 		if (b_room(&reply->body.obj) < global.tune.maxrewrite) {
 			ha_warning("parsing [%s:%d] : http reply payload runs over the buffer space reserved to headers rewriting."