Fix a crash in how we monitor thread activity. Use pthread cleanup functionality instead of pthread_t, which is no longer valid after a thread has exited. TRQ-1745.
Merge branch '4.2-dev' of https://github.com/adaptivecomputing/torque into 4.2-dev