TRUNK -3267 : Delete any related objects here before deleting the obs

See https://tickets.openmrs.org/browse/TRUNK-3267