Threads.cpp: Add an API to print thread Id and name