Fix EZP-23152: deleteVersion removes images from published version

JIRA: https://jira.ez.no/browse/EZP-23152

Image references are removed in the assumption there are no other field ids using it, which may not be true.
This adds a check for additional versions using the same id, and does not remove the reference in that case.

TODO: add integration/regression test?
* When deleting version 2 (draft) it should return > 0 if the published version (1) has the same references.
* Good catch, it should check `$path`. seems to work without it (due to fieldId), but could introduce some weird behavior.