We are seeing some errors when migrating and adding indexes on `answer_post_id`.
```
#<StandardError:"An error has occurred, all later migrations canceled:\n\nPG::UniqueViolation: ERROR: could not create unique index \"index_discourse_solved_solved_topics_on_answer_post_id\"\nDETAIL: Key (answer_post_id)=(13006) is duplicated.\n">
```
This PR modifies the earlier migration, and also adds one before the addition of indexes to remove duplicates.
https://github.com/discourse/discourse-solved/pull/342 was deployed and observed to only have 5000 (batch size) migrated. This is an error in migration where the ids had a gap between the batch.
This PR changes the migration to just loop through all topic custom fields with each loop increasing by batch size.
This is necessary, because seeding badges with a translated name will result in duplicate badges whenever the default locale changes. The static name solves this.
Moreover, it's not necessary to set the description during seeding. The serializer will localize the names and descriptions at runtime.
The DB migration tries to rename the existing badges by looking them up by their translated time.