wasapi: Fix infinite loop when the device disappears

When the audio device goes away during playback or capture, we were
going into an infinite loop of AUDCLNT_E_DEVICE_INVALIDATED. Return -1
and post an error message so the ringbuffer thread exits with an error.
8 jobs for wasapi-infinite-loop in 19 minutes and 32 seconds (queued for 1 second)