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
Status Job ID Name Coverage
  Test
passed #825386
flatpak
flatpak devel

00:13:40

passed #825387
style check

00:02:06