Fixing renaming for stable5

Fixing https://github.com/owncloud/core/issues/3929

Backporting public uploads bring to stable5 another new feature (preselected filename on renaming) partially so let's backport it completely

ref https://github.com/owncloud/core/commit/591b383f2dd1601009382152079e004034c4258d#core/js/js.js

@DeepDiver1975 @butonic