sheep, logger: select log formatter before log_init()

sd_printf() series can be called before calling log_init(). In such a
case, segmentation faults can be rised because format in logger.c is
NULL.
e.g. init_path() calls sd_eprintf() before log_init() when it fails
creating directory for sheep process.

This patch adds new function select_log_formatter(). This is only for
selecting formatter and should be called before sd_printf() series.
After applying this patch, sheep calls this function in the loop for
parsing command line options.

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