Fix EZP-22433: do not image attributes when trashing an empty image

JIRA: 
* https://jira.ez.no/browse/EZP-22628, 
* https://jira.ez.no/browse/EZP-22433

This PR checks that an image exists when sending an ezimage attribute to trash, which prevents generating inconsistent data when no actual image exists.