MDL-43440 unit testing: Use cmid in unit tests when it should be used.

instance is has been used instead of cmid.  This works as all id's are 1
in most cases, but not always.

accesslib_clear_all_caches_for_unit_testing was updated to clear the
$USER->access cache which would fail test when the wrong user's data was used.

Conflicts from extra tests in master:
	blocks/comments/tests/events_test.php
	mod/assign/submission/comments/tests/events_test.php
	mod/data/tests/lib_test.php
	mod/glossary/tests/events_test.php
MDL-43593 Assign editpdf: More robust handling of errors from TCPDF.

This includes a check to see if there are 0 pages in the combined pdf,
catching exceptions and suppressing php warnings and errors from bad pdf files.

Also - Use TCPDF directly to check if pdfs are compatible. The previous check was
letting dodgy PDFs through which then failed at generation time. This way dodgy
pdfs will get run through ghostscript early and cleaned up.
MDL-43369 : quiz statistics - average across attempts where item seen

and not across all attempts for subqs.
MDL-39942: invite only users who can post to discuss
MDL-43884 database: Fix get_tables() api for external stores
MDL-43892 dbtransfer: Fix missing string.
MDL-43885 Javascript: Make the [X] button work like 'No' in relevant dialogues

The [X] button on the dialogue is another form of the 'No' button and
should behave as such. In some dialogues this matters more than others
because the dialogue is destroyed.
MDL-43805 assign: Quickgrading wipes out grades for hidden columns.

Grr.. quickgrading will always be a hack.
MDL-43805 assign: Behat test for quickgrading bug
MDL-37714: Correctly identify frequently used comments during restore
MDL-43905 fix update of user login times

There needs to be only one event during user login.
The timemodified field is not supposed to be updated during login.
MDL-33920 filepicker: hide 'save as' field when not applicable
MDL-41384 upgrade: make sure to re-read $SITE from DB when course table is altered
MDL-41384 course: do not show debugging message if $COURSE contains format options

before showing debugging message make sure that field exists in database and not only in the object
MDL-43828 forum: allow to select single available group when posting
MDL-43926 Unit tests shouldn't assume only one category on install
MDL-43936 questions: document renderer API change.
MDL-41644 Backup: Update CSS class .notifywarning with .notifyproblem
MDL-41647 WebServices: Changed notification CSS class
Merge branch 'MDL-43440-26' of git://github.com/mr-russ/moodle into MOODLE_26_STABLE