MEDIUM: ist: always turn header names to lower case

HTTP/2 and above require header names to be lower cased, while HTTP/1
doesn't care. By making lower case the standard way to store header
names in HTX, we can significantly simplify all operations applying to
header names retrieved from HTX (including, but not limited to, lookups
and lower case checks which are not needed anymore).

As a side effect of replacing memcpy() with ist2bin_lc(), a small increase
of the request rate performance of about 0.5-1% was noticed on keep-alive
traffic, very likely due to memcpy() being overkill for tiny strings.

This trivial patch was marked medium because it may have a visible end-user
impact (e.g. non-HTTP compliant agent, etc).
diff --git a/src/htx.c b/src/htx.c
index 5ca7b7e..2c660e7 100644
--- a/src/htx.c
+++ b/src/htx.c
@@ -567,6 +567,7 @@
 
 /* Replaces an header by a new one. The new header can be smaller or larger than
  * the old one. It returns the new block on success, otherwise it returns NULL.
+ * The header name is always lower cased.
  */
 struct htx_blk *htx_replace_header(struct htx *htx, struct htx_blk *blk,
 				   const struct ist name, const struct ist value)
@@ -582,7 +583,7 @@
 		return NULL;
 
 	blk->info = (type << 28) + (value.len << 8) + name.len;
-	memcpy(htx_get_blk_ptr(htx, blk), name.ptr, name.len);
+	ist2bin_lc(htx_get_blk_ptr(htx, blk), name);
 	memcpy(htx_get_blk_ptr(htx, blk) + name.len, value.ptr, value.len);
 
 	return blk;
@@ -675,7 +676,7 @@
 }
 
 /* Adds an HTX block of type HDR in <htx>. It returns the new block on
- * success. Otherwise, it returns NULL.
+ * success. Otherwise, it returns NULL. The header name is always lower cased.
  */
 struct htx_blk *htx_add_header(struct htx *htx, const struct ist name,
 			       const struct ist value)
@@ -688,7 +689,7 @@
 		return NULL;
 
 	blk->info += (value.len << 8) + name.len;
-	memcpy(htx_get_blk_ptr(htx, blk), name.ptr, name.len);
+	ist2bin_lc(htx_get_blk_ptr(htx, blk), name);
 	memcpy(htx_get_blk_ptr(htx, blk)  + name.len, value.ptr, value.len);
 	return blk;
 }