Added process and thread info.

The entry now contains thread name and id as well as process name
and id. This can be usefull in multithreaded or multiproc apps.
The code is also a little cleaned up now.