Handle ERROR_IO_PENDING from UnregisterWait...

ERROR_IO_PENDING simply means the callback was still executing, not that
the wait failed to unregister.
Add lots more asserts.