MDL-46921 lib: Add sorting on additional name fields

A thank you to Yishe Choden for creating a patch for this issue.
MDL-46921 lib: Update get_all_user_name_fields() plus unit tests.
MDL-46921 lib: Sorting on additional fields, admin, enrolment pages.
MDL-46921 lib: behat tests for alternate name sorting.
Merge branch 'wip-MDL-46921-master' of git://github.com/abgreeve/moodle
MDL-46284 tool_messageinbound: Fail with warning if handler disabled

If a handler is disabled, the user should be informed of this issue.

This issue is a part of the MDL-47194 Task.
This issue is a part of the MDL-39707 Epic.
Merge branch 'MDL-47194-master-fixes' of git://github.com/andrewnicols/moodle
MDL-46921 User: Add @core_user to new behat test.
MDL-45758 tool_monitor: Add basic file structure of the report

Original issue - MDL-45916
MDL-45758 tool_monitor: Adding xml file defining the db tables

Original issue - MDL-45916
MDL-45758 tool_monitor: Implement a class to generate list of events

Original issue - MDL-46109
MDL-45758 tool_monitor: Implement a rule instance class

Original issue - MDL-45939
MDL-45758 navigation: updates to navigation

This patch does the following:-
Start using proper key for course report node
Allow admin tools to hook into course navigation

Original issue - MDL-46131
MDL-45758 tool_monitor: Build the navigation tree for the tool

Original issue - MDL-46131
MDL-45758 tool_monitor: Add a subscription manager class

Original issue - MDL-45919
MDL-45758 tool_monitor: Rule manager class and data generators

This issue introduces rule manager class, data generators and unit tests
associated with them.

Original issue - MDL-45918
MDL-45758 tool_monitor: Polish the code for rule manager and unit tests

Original issue - MDL-45918
MDL-45758 tool_monitor: Initial version of rule form.

Original issue - MDL-45938
MDL-45758 tool_monitor: YUI module to handle event selection dropdown

Original issue - MDL-45938
MDL-45758 tool_monitor: Add support for editing/creating a rule

Original issue - MDL-45938