MDL-39725 database: Add statistics collection functions

Conflicts:
	lib/dml/moodle_database.php
MDL-39725 database: Include stats collections in unit tests

Conflicts:
	lib/ddl/tests/ddl_test.php
MDL-39725 database: Apply database statistics update to daily stats
Merge branch 'MDL-41075-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE
MDL-37679 Course: Adding section to page title on section only pages
MDL-40750 course: Add JS category expander (backport of MDL-38661)

This includes the following commits:

 * dd834cb MDL-38661 JavaScript: Add missing lazy loading on collapseall
 * 4dab1c3 MDL-38661 JavaScript: Ensure that ARIA tags are set when expanding/collapsing content
 * 1574e65 MDL-38661: Add keyboard support for expansion
 * 3df632f MDL-38661 Add pointer cursor to clickable collapse/expand icons
 * 53c1b93 MDL-38661 Course: Add JS category expander.
Merge branch 'MDL-37679-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE
MDL-38698 filter_urltolink: Do not link the URL property of CSS
MDL-38698 filter_urltolink: Remove performance test in Unit Test
Merge branch 'MDL-43306-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE
MDL-43423 behat: Running hooks before and after each step of a chained step
Merge branch 'MDL-40750-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Merge branch 'MDL-38698-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Merge branch 'MDL-43355_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE
Merge branch 'MDL-43235_25' of git://github.com/dmonllao/moodle into MOODLE_25_STABLE
MDL-42104: trap tab focus within dialog modal,

for filepicker and filemanager

Conflicts:
	lib/form/filemanager.js
MDL-41292 cache: only update identifiers if they change
Revert "MDL-42104: trap tab focus within dialog modal,"

This reverts commit 3a0be85aebd395c0c6d62b1e77407ff13b66600d.
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.

Conflicts:

	lib/tests/accesslib_test.php