wined3d: Avoid writing queue->head in the CS thread.