Windows: clean up error handler
Under certain conditions the signal handler can end up in a loop, this will show up in the the testsuite as a timeout.
This simplified the logic of the signal handlers a bit and prevents the issue. Unfortunately Microsoft's documentation on this stuff is severely lacking so it is still a best guess/reverse engineering based effort. But seems to work and code is easier to follow.