Demographics initial work

Note that a lot of the logic in the CourseEnrollmentTask is refactored from the original logic in course_enroll.py
This all seems adequate for these demographic tasks, where we just need to count those users with at_end = 1.  And it's presumably adequate also for calculating changes in daily enrollments, using the change_since_last_day field.  And for activity, we just use the presence of an entry.  Looks okay.  But just to clarify, if we have an UNENROLL, then a few days, and another ENROLL, we should get a run up to the UNENROLL, then no events, then a second run starting with the ENROLL until the end of the interval.