BUG/MINOR: htx: add two missing HTX_FL_EOI and remove an unexpected one

A workaround for some difficulties encountered to anticipate end of
messages was addressed by commit 810df0614 ("MEDIUM: htx: Add a flag on
a HTX message when no more data are expected"), but there were 3 issues
in it (with minor impact):
  - the flag was mistakenly set before an EOH in Lua, which would only
    cause incomplete packets to be emitted for now but could cause
    truncated responses in the future. It's not needed to add it on
    the next EOM block as http_forward_proxy_resp() already does it.

  - one was still missing in hlua_applet_http_fct(), possibly causing
    delays on Lua services

  - one was missing in the Prometheus exporter.

All this simply shows that this mechanism is still quite fragile and
not trivial to use, especially in order to deal with the impossibility
to append the EOM, so we'll need to improve the solution in the future
and future backports should not be completely ruled out.

This fix must be backported where the patch above is backported,
typically 2.1 and later as it was required for a set of fixes.
diff --git a/src/hlua.c b/src/hlua.c
index 556de42..17de7a0 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -4582,7 +4582,6 @@
 	}
 
 	/* Finalize headers. */
-	htx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
 	if (!htx_add_endof(htx, HTX_BLK_EOH)) {
 		hlua_pusherror(L, "Lua applet http '%s': Failed create the response.\n",
 			       appctx->appctx->rule->arg.hlua_rule->fcn.name);
@@ -7122,6 +7121,7 @@
 			goto error;
 
 		/* Don't add TLR because mux-h1 will take care of it */
+		res_htx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
 		if (!htx_add_endof(res_htx, HTX_BLK_EOM)) {
 			si_rx_room_blk(si);
 			goto out;