introduce libj::Thread
make console thread-safe
fix a build error