implemented couple of new thread functions: wait and release
winmm & xaudio2: use Thread::wait and Thread::release