[director] Fix update PTR records when IP changed in same subnet

Fixes 46951863: Postgres foreign key constraints can be violated when doing a deployment