MDL-47569 backup: Escape section summary for XML

This was causing the parsing of the XML
to fail because things like & were not
escaped.
MDL-47569 backup: Do not close questions tag if never opened

This can happen when restoring quizzes that
do not have any questions.
MDL-29873 Lesson: Essays not shown on grade page with SQL server
MDL-47918 mod_forum: Unsubscribe all - remove discussion subscriptions
MDL-42875 users: Show only profile visible roles on participants list
MDL-47959 Number of questions not updated dynamically in new quiz edit page
MDL-47349 gradereport: Use category title on report
MDL-47970 mod_scorm: fixed HTML5 validation error
MDL-25057 mod_forum: Stop duplicating forum_read posts from cron

This also includes an upgrade script to delete the existing duplicates.
MDL-47896 gradebook: Fix for non-overridden grades.
MDL-47310 gradebook: accessibility improvements
MDL-47909 mod_forum: Respect user autosubscribe setting on post

Re-appropriate the forum autosubscribe setting as a discussion
autosubscribe setting.

The setting was no longer used after the per-discussion changes. The
original plan had been to remove this setting, but there is some benefit to
respecting it for discussion subscriptions instead.
MDL-47746 gradebook: Visual bug fix for Scales in Singleview.
MDL-47919 tool_monitor: refer to fields by labels in behat
Merge branch 'MDL-29873' of git://github.com/jmvedrine/moodle
Merge branch 'MDL-47349-master' of git://github.com/andrewnicols/moodle
Merge branch 'MDL-47310-master' of git://github.com/jethac/moodle
Merge branch 'MDL-47909-master' of git://github.com/andrewnicols/moodle
Merge branch '47970-28' of git://github.com/samhemelryk/moodle
Merge branch 'MDL-47569_CC_Errors' of git://github.com/moodlerooms/moodle