logger: format in logger process

Current sheep formats log lines in sheep process before sending them
to logger process. This patch moves the formatting from sheep to
logger because it will make a noise for workload of sheep (of course
they are sublte but it is better to do this).

In addition, this patch let logger obtain timestamp with
gettimeofday() instead of time(). The purpose of this change is more
accurate timestamp. Because many logs can be generated in one second,
second is not suitable unit of timestamp for collecting multiple log
files and sorting them with timestamp.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
logger: JSON format for logging

This patch implements a function for formatting logs in JSON, and a
simple mechanism for supporting multiple formatters like backend
stores and cluster drivers.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
sheep: add new option -F for selecting log format

This patch adds new option '-F' (or '--log-format') to sheep. With
this option, users can specify a log format. e.g.
sheep -F json /store/sheep     # format log with json
sheep -F default /store/sheep  # format with default style

Without -F option, sheep selects the default style for formatting.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>