On windows, ignore WM_QUERYENDSESSION and close upon WM_ENDSESSION. The messages can come through CFrame::MSWWindowProc and the wxApp implementation, so make sure to catch both. Fixes issue 6546.