Fix EZP-22433: check for empty image when trashing ezimage attribute

JIRA: https://jira.ez.no/browse/EZP-23066

also
* 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.