Adjust WaitOne, WaitAny, and WaitAll to ignore thread interrupts due to APCs. Fixes debugger causing waits to be interrupted (case 604543).
Move wait_and_ignore_interrupt function to before all uses of it (case 604543).
Handle timeout during wait methods (case 612251)