TPS-785 [5.4.2]tMDMDelete can't delete all records of one entity(TMDM-7953)

TMDM-7953: "tMDMDelete can't delete all records of one entity"

Fix possible incorrect name in delete statement (missing DB-specific name length restriction).
Don't update inbound FK to null when FK is mandatory (as NOT NULL constraint exists in this case).
Backport of commit 0a6a5e153c007f35ed13fa32bcf46edae7976bc8 for 5.4 / 5.5 branches.
(https://jira.talendforge.org/browse/TMDM-7953)
(cherry-pick from 0c99fc947803b823a39476bfd26423ee53907f39
1aac9e26f357d45642ae85bd4dfee15737a247d4)