Fixing sorting of terms for reprocessenrolments list
Fixing problem where users couldn't clean install on Moodle version before 2.5.

Because of MDL-37726, the XML was not correct.
Adding stuff from 2.5.2 release.