TS-2363: Fix assertion of "Unknown file format type!"

What leading to this assertion is that LogFile object passed to
flush thread has been destroyed within Log::periodic_tasks()
when accessing it.

This patch introduces refcount for LogFile object to avoid been
destroyed untimely.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>