MDL-42111 TinyMCE media preview: fix video preview display for TinyMCE media.

Effected themes: boxxie, clean, brick, formal_white and splash.
MDL-42494 Fix workshop coding exception if all assessments have zero weight

If all assessments for the given submission have zero weight, the grading
evaluation plugin "Comparison with the best assessment" is unable to decide on
the average assessment as it ignores those with zero weight. In such rare case,
it makes sense to set the grading grade to null and prevent the coding
exception.
MDL-34654 Glossary: ampersand breaks auto-linking
MDL-42400 modlib: include module file when it's used

- changed the place where module file is included to make sure that add_moduleinfo() can be called independently from create_module()
- removed permission check from add_moduleinfo() because this function is not supposed to check permissions. Besides it's only half-check. See can_add_moduleinfo()
- added phpdocs to some functions to indicate that they can throw an exception
MDL-42400 generator: module generators call add_moduleinfo instead of direct inserts
MDL-42400 generator: Add function testing_module_generator::create_content()

also implement it for mod_book and mod_forum to call existing create_page, create_discussion/post functions
MDL-42400 tool_generator: save db query in module generation
MDL-42400 modlib: speed up add_moduleinfo, remove unnecessary queries

removed code that was causing unnecessary DB queries, this significantly speeds up data generators
MDL-42400 mod_glossary: data generator for glossary
MDL-42400 mod_lesson: data generator for lesson
MDL-42400 mod_survey: data generator for survey
MDL-42400 mod_url: data generator for url
MDL-42400 mod_wiki: data generator for wiki
MDL-42400 mod_workshop: data generator for workshop
MDL-42400 generator: unittest for module generator
MDL-42489 backup: use correct exception class in automated backups
MDL-42577 mod_url: add redirection delay with edit link

only for teachers and in the course format that does not have course view page (Single activity)
MDL-42566 mod_data: introduced check to ensure the picture supplied is valid
MDL-42617 Add support for frozen fields in searchableselector form elements
MDL-42286 questionbank: add behat tests for putting questions in categories MDLQA-95