[DF-4152] Correctly killing POSIX threads. pthread_cancel() is the way. pthread_kill() just sends signal, but not kills thread. Added mechanism to ask thread to finish himself by calling Thread::Cancel();