Fixfor fx 137 replace pthread

Add Poco::Thread based thread impl. Please, review.
I'm also going to add tbb::tread impl after this is accepted.