Extract discussions data from notes table into its own
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=213988) </details> <!--IssueSummary end--> Currently, discussions are built in the runtime from notes of the discussion: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/models/discussion.rb#L41. Also, some columns in the `notes` table contain the data related to the whole discussion and this data is replicated across all the notes of the discussions. For example, `line_code`, `position`, `original_position`, `change_position`. If we could move the discussions data into its own table, we would duplicate this data. That would help us to solve the following problem: https://gitlab.com/gitlab-org/gitlab/-/issues/213854 Related issues/comments: - https://gitlab.com/gitlab-org/gitlab/-/issues/198457 - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28623#note_320941355
issue