Add pthread id to trace entry struct

We retrieve the tid using pthread_self() and save it to the entry. Then
we dump it in the PrintTrace tool.