MEDIUM: log: use log_format for mode tcplog

Merge http_sess_log() and tcp_sess_log() to sess_log() and move it to
log.c

A new field in logformat_type define if you can use a logformat
variable in TCP or HTTP mode.

doc: log-format in tcp mode

Note that due to the way log buffer allocation currently works, trying to
log an HTTP request without "option httplog" is still not possible. This
will change in the near future.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index e01b90f..6f1df9c 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -3313,9 +3313,13 @@
 			}
 			parse_logformat_string(logformat, curproxy);
 		}
-		else if (!strcmp(args[1], "tcplog"))
+		else if (!strcmp(args[1], "tcplog")) {
+			char *logformat;
 			/* generate a detailed TCP log */
 			curproxy->to_log |= LW_DATE | LW_CLIP | LW_SVID | LW_PXID | LW_BYTES;
+			logformat = default_tcp_log_format;
+			parse_logformat_string(logformat, curproxy);
+		}
 		else if (!strcmp(args[1], "tcpka")) {
 			/* enable TCP keep-alives on client and server sessions */
 			if (warnifnotcap(curproxy, PR_CAP_BE | PR_CAP_FE, file, linenum, args[1], NULL))