As an alternative solution for
MDL-17929 I suggest to extend groups functionality to allow either manually created groups (as they are now) or automatic synchronisation of the groups to include users who are enrolled using selected enrolment method. I see this especially useful for meta courses (enrol_meta) and cohort synchronisation (enrol_cohort).
Synchronisation should be many-to-many and allowed from both "Groups" page and "Edit enrolment method" page. If selected, the manual adding users to the group will be locked and users in the group will be synchronised in cron.
Another suggestion is to automatically synchronise course groups with cohorts - this can be useful when students who are not enrolled using enrol_cohort method or there are other cohorts than those that are synched.