MDL-32898 Final deprecation of moodle_strtolower()
 MDL-34508 Formslib: Removed deprecated setHelpButton() from editor.php and hidden.php
MDL-33379 course: Removed deprecated move_section() from course/lib.php
MDL-39454 Accesslib: is_siteadmin is a bit slow
MDL-39490 Inform the developer about incorrect order of text processing

Before calling format_text(), the text must be processed with
file_rewrite_pluginfile_urls(). This order is important
for some text filters that look for valid pluginfile.php URLs.
MDL-39639 Formslib: Hide calendar for datetime element on disable event
MDL-28558 Administration: Made Country and City user profile fields optional
MDL-39947 mod_forum: Add safety check to variable assignment when counting unread posts
MDL-40008 forms: fixed ordering of the calendar icon and enable checkbox for the date selector element
MDL-40009 notes: corrected the form element names passed to setType
MDL-40018 theme_sky_high: Fixed footer in admin pages.
MDL-40080 Remove unused strings from the core_hub subsystem
MDL-40013 Easier to override saving question hints

This adds 3 new methods, called from question_type::save_hints,
to make it easier for different question types to overload this
functionality without duplicating code.

Question types that will benefit from this change include
oumultiresponse, ddmarker, preg and correctwriting.
MDL-39832 Files: Revert MDL-39688 commit, f111746140fe80a821ae69e3bf518d950bf188a1

MDL-39688 has been successful in providing a solution for the issue but further
investigations done in MDL-39832 have got the evidence that the given solution
is more likely a workaround.
MDL-39832 Files: Fixed ETag format according with RFC2616.

ETag must be double quoted,
http://tools.ietf.org/html/rfc2616#section-3.11:

      entity-tag = [ weak ] opaque-tag
      weak       = "W/"
      opaque-tag = quoted-string
MDL-39338 core_question: Make history box a .well
MDL-37968 course_overview: add dim class to hidden courses for teachers.
MDL-39746 - Themes - Hiding the user picture on the forum page when the screensize is too small to allow for it
MDL-28394 fix enrolment method restore logic

This patch fixes:
* missing enrolment methods after 1.9 backup restore - defaults are added
* enrolment methods are restored only when users option is enabled
* manual enrolment override option is disabled if users not available
MDL-37974 add "Disable course enrolment" expiration action for manual enrolments

Commit amended by Petr Skoda to match recommended coding style.