[r] Refactor exam groups and related models

- Refactor ```exam_group``` and ```exam_score``` models
- Refactor tests for these models as well
- There are some bad code which I left some TODO comments, but I'll fix it later,