batch-rename: Use tmp filename in the case of filename "loops"

Errors can occur when batch renaming files if a
new filename matches an existing filename.

Reordering the files does not solve this problem if the
filenames contain loops (ex. A -> B & B -> A).

Instead of reordering the files, give any problematic
files a temporary name and handle them after the rest of
the files have been renamed.

GNOME/nautilus#1443
2 jobs for batch-rename in 13 minutes and 40 seconds
latest
Status Name Job ID Coverage
  Test
passed flatpak devel #825386
flatpak

00:13:40

passed style check #825387

00:02:06