MDL-43848 messages: do not display message content in popups

The user is not in control of when these popups show up and it
may not be appropiate to have part of this content display whilst
in the presence of other users.
MDL-45485 auth_shibboleth: User taking over other user's session

Replacing code with call to complete_user_login() since it calls session_regenerate_id().
MDL-45616 repositories: more clearly distinguish when we use source and when reference

Function repository::get_moodle_file() should always be called on packed reference and not on the source received from user.
Also added phpdocs to some other methods that were confusing source and reference
MDL-45616 repositories: use json encoding instead of serialization
MDL-45463 mod_lti: Prevent XML entity injections from provider
MDL-45417 mod_imscp: Prevent entity injections from package content
MDL-46148 qtype_calculated: fix formula validation.
MDL-45760 make sure to check permission before setting header
MDL-46223 Improve the rubric output
MDL-46223 Improve the marking guide output
MDL-43948 forms: setting types to filemanager and editor elements
MDL-45471 javascript: Escape content of exception dialogs
MDL-46223 Improve the display of marking guide validation message
MDL-46223 Fix frequently used comments in the marking guide

When the frequently used comment contains a character like >, re-use it
directly instead of its HTML entitiy.
MDL-46148 qtype_calculated: removed unused method.
MDL-46148 qtype_calculated: fix validation when importing.

In order to do this in a sane way, I cleaned up a lot of old mess,
inclduing:

1. Previously, qtype_calcuated used ->answeres when importing, and
->answer when saving the form. This was crazy, so I fixed it, and
stripped out the code that made the alternative variable name work.

2. Similarly, it could handle ->answer being either an array, such as
you would get form the HTML editor, or a simple string, which is what
you get form the form. I simplified that too.

3. Finally, I made import use a transaction around saving each
question, so we don't get half questions in the database when an error
occurs.
MDL-46148 qtype_calculatedsimple: fix notice

... when adding a dataset with a formula error.
MDL-46148 questions: Added missing allow_commit for transaction
MDL-46148 qtype_calculated: low-level defence against bad formulas

This catches things like:
 * Malicious equations coming from backup files.
 * Malicious equations in old questions in the database.