Fix crash on package detail page when the package has changed archive
Previous entries of a file in the Repository object where removed base on its full path. While this is sufficient to handle uploads of the same version, it will create duplicate entries when a packages is moved to another archive area (main, contrib, non-free).
This MR remove all entries based only on the filename. This will take care of this case as well.