Add test coverage to course groups app

TNL-21

@jimabramson @andy-armstrong 
`add_cohort` (and almost every other view in `course_groups`) favors JSON error messages over HTTP status codes.