archive: Fix some memory leaks

Unfortunately, the clever trick to avoid string copying causes leaks
because it inserts NULLs in the middle of a NULL-terminated array.

https://bugzilla.gnome.org/show_bug.cgi?id=729463
archive: Allow reading files with '/./' in the path

Allow reading files with a "." component in the path.  This is a
followup to 46bdbf1d4596 ('archive: Ignore filenames consisting of a
single "."'), which allowed the archive backend to enumerate an archive
with a single "." in the path.

Implement this with a generic function to fixup an archive_entry path,
and use this wherever archive_entry_pathname() is used.

https://bugzilla.gnome.org/show_bug.cgi?id=729463