Fix crash when closing one of the main windows showing the same document
- Windows->New Window
- [in the second window] Windows->New View->Untitled
- Close first main window
- Paint something slow
- See a crash in KisCompositeProgressProxy (that was not disconnected before closing the main window)