added support for threads (/proc/<pid>/task/<tid>)