Fix TLinkedList so that it IS thread-safe, instead of just LOOKING thread-safe.

There were two problems:
  (1) All iteration operations were always followed by calls to AddRef, and
  those AddRefs all need to be done atomically with the GetFirst/GetNext.
  (2) If thread A was in a loop iterating over a list and thread B called
  GetFirstEntry or RemoveFirstEntry for that same list, the iterator
  variable got stomped on which pretty much kicked thread A in the nuts.

Now, the caller must take the list's lock before beginning an iteration
sequence, and keep it until done iterating.  This fixes both problems.


git-svn-id: http://scm.sipfoundry.org/rep/sipX/branches/rtcp-reenable@12111 a612230a-c5fa-0310-af8b-88eea846685b
Fix (or at least, improve) the handling of Task IDs.

The problem is that they are treated as int or DWORD, but that is
not correct on Linux/64.  I invented our own typedef, OsTaskId_t,
which is defined as pthread_t on Linux.  Windows... who knows...

There is still some trouble around the formatting of OsTaskId_t values,
for example in OsSysLog.  My idea is to delegate that to a function or
functions in the platform-specific implementations (e.g. OsTaskLinux)
that take an OsTaskId_t and return a formatted value in a UtlString...
Later...


git-svn-id: http://scm.sipfoundry.org/rep/sipX/branches/rtcp-reenable@12112 a612230a-c5fa-0310-af8b-88eea846685b
"Improve" portability -- use OsTaskLinux conversion functions to format OsTaskId_t values; other platforms will need to add the same methods at some point.

git-svn-id: http://scm.sipfoundry.org/rep/sipX/branches/rtcp-reenable@12113 a612230a-c5fa-0310-af8b-88eea846685b