Stop querying for the file-name, as it's unused. Rather than fetching all ids,
then looking at each to see if it can be deleted, do some imperfect but not
too slow checks in the initial query.
This, along with the way of specifying which branches are processed is a way
to manage the data stored within the Guix Data Service.
This only goes so far, it doesn't delete derivations, but it does delete some
of the information related to a revision.