TNL-301 Filter posts by group_id.

https://openedx.atlassian.net/browse/TNL-301

@gwprice @jimabramson Please review.
We should rely on the user object being well formed. This function could collapse to the following:

```
user_course_info = user["course_info"].get(course_id)
return (
    user_course_info and (
        group_id is None or
        user_course_info["see_all_cohorts"] or
        user_course_info["cohort_id"] == group_id
    )
)
```