Fixfor fx 137 replace pthread

Not yet complete since f8test & hftest hags somewere in AsyncSocket destruction trying to join inner threads... Spent several hours on that, no success yet...