LPS-47852

@sergiogonzalez, same pull than https://github.com/sergiogonzalez/liferay-portal/pull/1646 but I have added all rename logic of checkDuplicatedTitles at UpgradeDocumentLibrary

With previous code, all upgrade was done fine, but database index was not created due to duplicate values at "filename"