Force stop the event queue on exit

The GHC RTS can get stuck waiting for FFI calls to finish, and since
we're doing a blocking call and the UI isn't going to send any more
events, this can cause the app to fail to exit.  So we invalidate the
entire queue before exit so that the FFI call can stop.