Be tolerant with duplicate parents in _writeInheritanceData
Now setInheritanceData API supports duplicate parents in data again.
And we choose to clean the other fields from "delete link" items, so that the ineffective update after deletion which was reported in #1435.
fixes: #2614
relates: #1434
relates: #1435