If some thread is already in APC wait (server_select), skip signal and addition server select overhead.
Notes: 1. It is tempting to just trivially pass NULL thread to thread_queue_apc() in async_terminate. But if a thread in APC wait won't be found that will mean that a signal will be sent to some random thread, which might be some time critical thread not doing any I/O, I think that would be very unfortunate.
2. The added timeout in kernel32/tests/pipe.c. There is a pre-existing minor disrepancy in async I/O handling with Windows. If some I/O call satisfied an overlapped I/O, its event will be signaled before the I/O call return on Windows, but not necessarily on Wine because before signaling the event an async should be processed in the client process and reply should be processed on the server. These tests succeeded before the patch only because queuing async write and then satisfying it with read is performed in the same thread. So if the I/O completing the previous async part is in the same thread, sigusr1 was sent during completing I/O server call and processed on the client before returning from I/O call. This is probably least practically interesting case, a bit more interesting case is when the prior async read or write is queued from another thread or process, but that won't (usually) be signaled before the completing I/O call exits in another thread neither before nor after this patch.