TS-1606: Log buffers are not flushed periodically when TS is launched with NO_REMOTE_MANAGEMENT flag

Also fix wrong check in Log::flush_thread_main. Credit to Yakov Markovitch <ymarkovitch@gmail.com> for
pinpointing the problem.