added a comment - - edited
Some points:
1) What's the point about to allow to (manually) delete the suspended enrolment in child courses? Next cron execution will re-add it again (as suspended, of course, because parent enrol is suspended). But why do we allow to delete?
2) Surely the cli/cron output needs to be a bit more "explicit", it shown information like:
enrolling: 4 ==> 3
suspending: 4 ==> 3
unassigning role: 4 ==> 3 as manager
and it's not clear what is what (course id/shortname, userid, roleid...)
3) Why are you getting used to add to the JOIN clause all the conditions related with that table? I can understand having some conditions there if we are looking for nulls and friends in OUTER join, but in INNER ones, all the non-joining conditions should go to the WHERE clause.
4) I have not played with the meta enrol plugin before, so I've one big concern: Are current defaults after upgrade 100% BC with previous behavior? Or anything has changed (apart from bugfixes).
5) There is one function... user_not_supposed_to_be_here() cannot we find better name, lol, sounds like a joke.
6) The reuse of the "extremoved...." lang strings in admin interface sounds a bit "forced" to me. While the values in the popup have sense (are neutral), both the label and the description lead to confusion, at least to me, talking about "external" sources. +1 to change that to the usual "parent course" slang (if that's the official name).
7) I'm initially feeling that this should go only to master, but if BC (point 4) is guaranteed and nobody is against it, I've not problems backporting it to 22_STABLE (right now it applies clean).
8) This will need documentation for sure about the new cli, the new settings, how the inheritance/suspended/deleted/settings are going to work, and also in release notes and surely some QA tests to cover it (chaining more than 1 parentchild surely). I've added the corresponding labels. They should be implemented immediately after this lands.
9) I saw above that you talked about 6 hours for cron execution, but finally implemented 1 hour. I've not problem with that, just to confirm it's the desired cron timing.
10) In one comment above, you say: "unenrolment - most of the user data is purged from course (including grades, group membership, preferences, submissions)". Are really submissions (assignment, workshop...) deleted on suspend? That surprised me a lot! (np with the rest I think).
And that's all, I'll keep this open for some time, there are not big changes, perhaps the tricky point is to decide about 22_STABLE.
Ciao 
oh, it was a lot bigger than I expected, I ended up rewriting nearly the all sync code and adding new options...
List of changes:
To integrators: I think it should go to 2.2 because people are not satisfied with the original implementation. I you disagree then at least put it into master only please.
- configurable unenrol action
- new setting for synchronisation of all enrolled users or users with role only
- cron period increased to 6 hours in order to lower server load, courses should not get out of sync often
- CLI sync script for debugging or manual sync
- phpdocs fixes
- when plugin is disabled all roles are removed, but enrollments are kept now
- uninstall script
- other bugfixing
To integrators: I think it should go to 2.2 because people are not satisfied with the original implementation. I you disagree then at least put it into master only please.