MDL-34401 Add caching into get_plugin_list() function

This is quite frequently called function at most pages. The cache needs to be
invalidated only when a new plugin is installed or existing plugin uninstalled.
However, given how moodle_needs_upgrading() checks for new plugins, we need to
purge the cache there. Which is a shame because this means that the cache gets
purged in each cron call and when the admin looks at the front page and/or
system notifications page.
MDL-34401 Add caching into get_plugin_types() function

This is a simple MUC replacement for the previous static arrays.
MDL-34401 Replace static variables in pluginlib with ad-hoc request caches

Where the static variable was not really needed (as in case of arrays
defined by the hard-coded list of items), non-static variable is used as
I believe that there is no real performance gain.
MDL-34401 Replace ad-hoc plugin request caches with proper application caches

Data cached in these caches change only at well defined places (during
need for upgrade checks, at the plugin management screen etc). So it
makes sense to use proper application caches instead of request caches.

This saves couple of database queries at almost every page in Moodle.
MDL-34401 Cache the contents of version.php files

This saves many inclusions of version.php files.
MDL-34401 Add language strings for the new cache definitions
MDL-38367 course dndupload - various tweaks to the UI

Switched to Moodle-style dialog boxes (thanks Andrew for the pointer)
Enter button now submits the form (from within the 'name' field)
Upload button is disabled when the name is empty (if the name is required for the selected handler)
Dialog now has 'What do you want to do with this text?' and 'Name' for the text
Entire course section now has a class added when you drag over it (to enable it to be styled in the future)
MDL-38367 course dndupload - workaround to allow 'add X here' text to be drop target in Firefox
MDL-38431 comment: Pass formated comment created time to JS and print_comment
MDL-38370 scorm: Fixing strict standard errors in outline report
MDL-38431 comment: profile url should be escaped, as it's used in html
MDL-38414 course: Settings form displays all role renaming fields
MDL-38330 blog: Behat tests for commenting
MDL-38416 grade: Grader report settings expands section by default
MDL-38418 grade: Course settings sections are expanded by default
MDL-38435 form: Sections can be expanded by default
MDL-38340 form: Last fieldset is collapsed by default
MDL-36872 reports: Fixing incorrect sorting of recent activites by timestamp
MDL-36395: Converted hard-coded MAX_USER_PER_PAGE to config setting

course, cohort, enrol, role, groups and forum used to use hard-coded
MAX_USERS_PER_PAGE=100 for rendering user list. This has been converted
to $CFG->maxusersperpage.
MDL-38166 mod_data Add option to open url in a new window