Refactor next-slug generation out of item and collection and into common.