BUG/MINOR: log: make log-format, unique-id-format and add-header more independant

It happens that all of them call parse_logformat_line() which sets
proxy->to_log with a number of flags affecting the line format for
all three users. For example, having a unique-id specified disables
the default log-format since fe->to_log is tested when the session
is established.

Similarly, having "option logasap" will cause "+" to be inserted in
unique-id or headers referencing some of the fields depending on
LW_BYTES.

This patch first removes most of the dependency on fe->to_log whenever
possible. The first possible cleanup is to stop checking fe->to_log
for being null, considering that it always contains at least LW_INIT
when any such usage is made of the log-format!

Also, some checks are wrong. s->logs.logwait cannot be nulled by
"logwait &= ~LW_*" since LW_INIT is always there. This results in
getting the wrong log at the end of a request or session when a
unique-id or add-header is set, because logwait is still not null
but the log-format is not checked.

Further cleanups are required. Most LW_* flags should be removed or at
least replaced with what they really mean (eg: depend on client-side
connection, depend on server-side connection, etc...) and this should
only affect logging, not other mechanisms.

This patch fixes the default log-format and tries to limit interferences
between the log formats, but does not pretend to do more for the moment,
since it's the most visible breakage.
diff --git a/include/types/log.h b/include/types/log.h
index 2a3a147..66b418d 100644
--- a/include/types/log.h
+++ b/include/types/log.h
@@ -127,8 +127,12 @@
 #define LOG_OPT_RES_CAP         0x00000010
 
 
-/* fields that need to be logged. They appear as flags in session->logs.logwait */
-#define LW_INIT		1	/* date */
+/* Fields that need to be extracted from the incoming connection or request for
+ * logging or for sending specific header information. They're set in px->to_log
+ * and appear as flags in session->logs.logwait, which are removed once the
+ * required information has been collected.
+ */
+#define LW_INIT		1	/* anything */
 #define LW_CLIP		2	/* CLient IP */
 #define LW_SVIP		4	/* SerVer IP */
 #define LW_SVID		8	/* server ID */