Resolves: rhbz#1007697 Update on a Window triggering delete on window

Reviewed-on: https://gerrit.libreoffice.org/8396
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 1ec2880679d88c89901ce00fe30dd78e584f6960)

Conflicts:
	svx/source/svdraw/sdrpaintwindow.cxx
	vcl/source/window/window.cxx

Change-Id: Ic6374ce45e3a3ba97217ae77e91f9143f46e277b
Reviewed-on: https://gerrit.libreoffice.org/8400
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>