MDL-42965 badges: Improve badge criteria review performance
MDL-43240 JavaScript: Remove deprecated functions for 2.7

This patch removes functions which were deprecated in Moodle 2.4:
* M.util.init_select_autosubmit
* M.util.init_url_select
* M.util.help_icon
MDL-41198 lib: Allow PHP to generate random seed on script start

All mt_srand instances are removed to allow PHP to do the work.
MDL-41198 lib: Allow PHP to generate random seed on script start

Most srand instances are removed to allow PHP to do the work.

srand was left for group randomization due to the method used.
MDL-41359 database: no table columns is a dml_excpeiton

When insert_record is called and it doesn't find any columns
to insert data into, that is a dml_exception as you need at least
one column in the database to insert into it.  This can happen
when you have created a zero column database table, or the table
does not exist.
MDL-41292 cache: only update identifiers if they change
MDL-43259 JavaScript: Deprecate M.core.dialogue's lightbox attribute

The lightbox attribute just sets the modal attribute of the upstream
dialogue and provides no real benefit. We should deprecate it in favour of
documented upstream attributes of Y.Panel.
MDL-40096 assign: Prevent js error because uniqid() is not unique.

Use html_writer::random_id instead because it incorporates a static counter.
MDL-43074 assignfeedback_editpdf: Use escapeshellarg for all args in exec command.

This is to fix a reported problem with windows compatibility (e.g. when ghostscript is installed in
a folder with spaces in the name).
MDL-43025 EditPDF: Increase memory limit when reading source pdfs.
MDL-43243 JavaScript: Deprecate hide_item
MDL-43243 JavaScript: Deprecate getElementsByClassName
MDL-43243 JavaScript: Deprecate addonload
MDL-43243 JavaScript: Deprecate show_item
MDL-43243 JavaScript: Deprecate destroy_item
MDL-25473 mediaplayer - prevent embedded videos from looping
MDL-40920 mod_url: replaced add_to_log calls with events
MDL-40922 mod_folder: replaced the 'view' and 'view all' add_to_log calls with an event
MDL-40922 mod_folder: replaced the 'edit' add_to_log call with an event
MDL-43306 restore: fix grade item sortorder restoration

Previously, restore was blindly inserting the old sort order into the
database, causing duplicate sortorders which lead to unpredicatble
sorting results.

Now we will use the api function to add it after the original sortorder,
this means if a duplicate exists in the original location, this item
will appear after it.