qemu-thread: handle spurious futex_wait wakeups