EZP-21324: image files can be removed by mistake

Since copies of archived versions aren't processed by eZDatatype::onPublish,
they still reference the same images than the original.

The removeAliases() method didn't take this into account, and could
delete images that were actually used by the original content.

This patch prevents the method from deleting images that don't have
an entry in ezimagefile.
EZP-21324: Added tests

Taken from https://github.com/ezsystems/ezpublish-legacy/pull/792
Merge pull request #825 from ezsystems/fix/EZP-21324-removing_archive_copy_removes_file

EZP-21324: image files can be removed by mistake