MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis

As part of fixing MDL-43430, a typo has been detected in the
quoted alphanumeric characters (the '=' and '>' were transposed).
MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis

The group names we get from ldap_find_user_groups() can contain invalid LDAP
filter characters. So we need to escape them for LDAP filter usage.
MDL-43430 enrol_ldap: Enrolment lost if member of group with parenthesis

While testing the fix, it was found that ldap_stripslashes() was broken and
using a deprecated PCRE patter modifier, so it's also been fixed.

Thanks to Damyon Wiese, some units tests have been added to cover
ldap_addslashes() and ldap_stripslashes().
MDL-47943 editor_atto: Save selection on mouseleave for Chrome
MDL-47922 tool_monitor: Update strings
MDL-47980 gradebook: add labels and legends missing from single view
MDL-48083 dml: Empty buffers on forced rollback
MDL-48061 mod_forum: Correct variable name in HTML warning message
Merge branch 'MDL-48061-master-fixes' of https://github.com/andrewnicols/moodle
MDL-48061 mod_forum: posttext should concat
Merge branch 'MDL-48061-master-fixes' of https://github.com/andrewnicols/moodle
Merge branch 'wip_MDL-48083_m28_rollback' of git://github.com/skodak/moodle
Merge branch 'wip_master_mdl-43430' of https://github.com/iarenaza/moodle
MDL-43430 ldap: whitespace fix
Merge branch 'MDL-47980-master' of git://github.com/jethac/moodle
MDL-47980 gradebook: fixed label for bulk insert select box
MDL-47390 mod_forum: Provide ID and Discussion ID for discussion unsub
Merge branch 'MDL-47922-master' of git://github.com/ankitagarwal/moodle
Merge branch 'MDL-47980-master-fixup' of https://github.com/jethac/moodle
Merge branch 'MDL-47390-master-fixes' of git://github.com/andrewnicols/moodle