fix memory leak on pasting metafiles into writer

copying from mspaint to writer and then deleting the image in a loop will
eventually exhaust all memory.

regression since 004a29b9ac66f68af5ea12a2303a4b2be77d8145

Change-Id: I381285cda3823de7df0c1725a339943caf9536fe
(cherry picked from commit 7d6e159df4c28afde2fff5bd734ec3a8f63cb15a)
Reviewed-on: https://gerrit.libreoffice.org/9383
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>