Refactor legacy code for /v2 to support content groups

Use updated content group handling and remove all references to the
old `variant` property of contents/answers.

The following /v2 endpoints are now fully implemented:
* Deleting all contents of a group (/)
* Retrieving ids of unanswered content in a group (/unanswered)
* Deleting all answers of contents in a group (/answers)
* Counting answers of a group (/answercount)
6 jobs for refac-content-groups
in 1 minute and 50 seconds and was queued for 3 seconds