logger: switch to the current thread when backtracing

Without this patch, we cannot dump stack frames when we are not in the
main thread.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>