TS-2162: Auto-created collation LogObject would be misused by access log

When collation host receives LogBuffer data from network, it'll create
LogObject according the data's format automatically.

Since the LogFilter of these auto-created LogObjects are empty, they
will be misused by access log generated by collation host itself –
toss_this_entry() will always return false when m_does_conjunction is
set.

This patch introduces a new member variable: m_auto_created in LogObject,
so that we can distinguish this type of LogObject to avoid misusing.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
TS-2005: two macros change to config parameters

  MAX_SESSION_COUNT_PER_MACHINE change to
     proxy.config.cluster.max_sessions_per_machine
  SESSION_LOCK_COUNT_PER_MACHINE change to
     proxy.config.cluster.session_locks_per_machine
TS-2145: Add metrics for log collation

Without accurate stats, we don't known whether the log is lost.
This patch is used to verify, such as:

1) At log client side, how many logs genterated from HttpSM, how many
   logs sent to LogServer.

2) At log server side, how many logs received from LogClient, how many
   logs written to LogServers's disk.

After apply this patch, we will get the following metrics for logging:
 a) Events of Log::error():
    proxy.process.log.event_log_error_ok
    proxy.process.log.event_log_error_skip
    proxy.process.log.event_log_error_aggr
    proxy.process.log.event_log_error_full
    proxy.process.log.event_log_error_fail

 b) Events for Log::access():
    proxy.process.log.event_log_access_ok
    proxy.process.log.event_log_access_skip
    proxy.process.log.event_log_access_aggr
    proxy.process.log.event_log_access_full
    proxy.process.log.event_log_access_fail

 c) Logging Data to/from network/disk:
    proxy.process.log.num_sent_to_network
    proxy.process.log.num_received_from_network
    proxy.process.log.num_flush_to_disk
    proxy.process.log.bytes_sent_to_network
    proxy.process.log.bytes_received_from_network
    proxy.process.log.bytes_flush_to_disk
    proxy.process.log.bytes_written_to_disk

 d) Mix:
    proxy.process.log.log_files_open
    proxy.process.log.log_files_space_used

BTW: Remove LOG_XXX stats macro according Leif's suggestion.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Change-Id: I4597bb8fb4b5b5e25dfee82949419bb477a19352
TS-2005: add NULL pointer judgement for race case

   connection_handler(ConnectContext *pConnectContext) change to
   connection_handler(ConnectContext *pConnectContext,
       const bool needLock)
reduce the crash when hdr of cache unmarshal failed but cache still thought
it is ok.