TPS-786 [5.5.1]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 09cc2dd2701f96fe13d6bdf866fd85fab7519072