Cleanup queries for ezcontentobject_link table

This PR adds cleanup queries for ezcontentobject_link table, it should be merged together with https://github.com/ezsystems/ezpublish-legacy/pull/529