(build) Update the way old builds are deleted

- Keep n builds instead of builds in the last n days
- Always delete/create composite repo indexes, to avoid fail if a build
doesn't contains p2.index or is invalid