tmpfiles: fix crash with NULL in arg_root and other fixes and tests
The function to replacement paths into the configuration file list was borked.
Apart from the crash with empty root prefix, it would incorrectly handle the
case where root *was* set, and the replacement file was supposed to override
an existing file.
prefix_root is used instead of path_join because prefix_root removes duplicate
slashes (when --root=dir/ is used).
A test is added.
Fixes #11124.
(cherry picked from commit 082bb1c59bd4300bcdc08488c94109680cfadf57)
Resolves: #1836024
patch_name: 0390-tmpfiles-fix-crash-with-NULL-in-arg_root-and-other-f.patch
present_in_specfile: true
location_in_specfile: 390
squash_commits: true