MDL-40035: Avoid rebuild_course_cache always for empty course
MDL-40388 Reset globals after each unit test
MDL-40386: Fix for updating timemodified field in book_chapters
Merge branch 'MDL-40499_24' of git://github.com/jmvedrine/moodle into MOODLE_24_STABLE
MDL-40176 mock_submit method for testing

Conflicts:

	lib/formslib.php
Merge branch 'MDL-40443_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE
MDL-40441 fix obscure notice in the quiz.

This can only happen if you have both a user with both a real attempt
and a preview, and then edit the quiz settings.

Also clean up this code a bit.
MDL-39420 multichoice: fix layout of multi-line choices.
Merge branch 'MDL-36479_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE
Merge branch 'MDL-39420_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE
Merge branch 'm24_MDL-40512' of git://github.com/danmarsden/moodle into MOODLE_24_STABLE
Merge branch 'MDL-40527_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE
Merge branch 'w28_MDL-40450_m24_tinymcebuttons' of https://github.com/skodak/moodle into MOODLE_24_STABLE
Merge branch 'MDL-40441_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE
MDL-40538 caching: Use isset for performance

isset is much faster than array_key_exists. For caches we need to
ensure as much performance as possible. To all null to continue to
be stored and provide correct results, non ttl also now saves in
$this->store[$key][0].  As isset($this->store[$key]) will return
true in all cases.

time() as found in cache::now() can be slow on some platforms and
we shouldn't bother checking it unless needed. It also stops non-ttl
caches paying the ttl price.

Unit tests were adjusted to ensure null is still handled correctly
when we are only using isset.
MDL-40093 mod/assign: Remove count of drafts in offline assignment's grading summary screen
Merge branch 'm24_MDL-39832_Fix_Chrome_Issues_ETag_XSendfile_2ndRound' of https://github.com/scara/moodle into MOODLE_24_STABLE
MDL-38366 repository_filesystem: Prevent use of empty subdir
Merge branch 'MDL-38366-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE
MDL-40621 fixed small bug in function editor_tinymce_plugin::fix_row()