MDL-37420 rework pg schema testing
MDL-35780 Administration: email display on user profile view page will respect user capability
MDL-37473 completion: Add missing cap checks to tracked users functions

Namely get_num_tracked_users and is_tracked_user()
MDL-36035 course: reduce database queries when calling print_whole_category_list

On a Moodle with 1252 course categories, this reduces the database
reads from 1313 to 62 for course/index.php
MDL-36035 course: renamed new functions and cleaned up docs
MDL-32341 calendar: get_file_by_hash() expects a hash
MDL-36457 testing Relocating classes
MDL-36853 SCORM: get first valid sco instead of array of scos - thanks to Jamie Smith for the fix - fixes PHP warnings when returning to an existing attempt.
MDL-35885 - Wiki - add a legend element to the search wikis form
MDL-36616 repository: Fix direct linking to images in Flickr Public.
MDL-37413 Use correct variable in chooserdialogue
MDL-37394 SCORM: Aicc direct url fails with new nav as it has a single sco with no children - allow these to be navigated correctly.
MDL-27164 groups Do not show multiple instances of the same role as multiple
Merge branch 'install_master' of git://git.moodle.cz/moodle-install
fix permissions
weekly release 2.5dev
MDL-37397 Test for a valid select in formautosubmit

Ideally we shouldn't get into this situation, but in cases where the
generated select element is incorrectly configured, we should try and
handle it gracefully with a warning.
NOBUG: Bumping version to test auto-packaging
MDL-37485 plugins overview: require_login before _capability.
MDL-37374 questions: use property_exists rather than isset

$a->field = null; isset($a->field) returns false, which is typical PHP.
I also improve the error handling a bit.