TNL-301 Filter posts by group_id.

https://openedx.atlassian.net/browse/TNL-301

@gwprice @jimabramson Please review.
For a course in which a user is no longer enrolled, user_has_access_to_thread below would return false for each thread, and then the course will be filtered out as empty. Instead, we could check for enrollment in this list comprehension by adding `if course_id in user_info["course_info"]`. We could also then pass only the necessary component of the user data (namely the course_info entry for the given course) to _build_digest_course, which would simplify that a bit more.