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)