Stream: use per thread ssn_pool_id instead of thread id.
Thread: remove thread id
Coverity 1040312, 1040313, 1040314 1040315: improve pool thread error handling.