MEDIUM: log: add a new log format flag "E"

The +E mode escapes characters '"', '\' and ']' with '\' as prefix. It
mostly makes sense to use it in the RFC5424 structured-data log formats.

Example:

log-format-sd %{+Q,+E}o\ [exampleSDID@1234\ header=%[capture.req.hdr(0)]]
diff --git a/include/proto/log.h b/include/proto/log.h
index 02e01f7..e606a3c 100644
--- a/include/proto/log.h
+++ b/include/proto/log.h
@@ -48,6 +48,14 @@
 extern char *logline_rfc5424;
 
 
+/*
+ * Initializes some log data.
+ */
+void init_log();
+
+/*
+ * Builds a log line.
+ */
 int build_logline(struct stream *s, char *dst, size_t maxsize, struct list *list_format);
 
 /*
diff --git a/include/types/log.h b/include/types/log.h
index 35c1228..e974086 100644
--- a/include/types/log.h
+++ b/include/types/log.h
@@ -141,6 +141,7 @@
 #define LOG_OPT_REQ_CAP         0x00000008
 #define LOG_OPT_RES_CAP         0x00000010
 #define LOG_OPT_HTTP            0x00000020
+#define LOG_OPT_ESC             0x00000040
 
 
 /* Fields that need to be extracted from the incoming connection or request for