MDL-44620 behat: Automates MDLQA-6

- MDLQA-6: By default, a new course contains a news
forum in which only teachers can post and subscription
is forced
MDL-44620 behat: Automate MDLQA-7

- MDLQA-7: By default, a new course contains a Latest
News block which displays a specific number of recent
discussions from the news forum
MDL-45654 cron: fix non-empty directories deletion

Remove errors when attempting to delete non-empty directories when
child directories do not get removed since the mtime was updated when
files were removed from the child directory.
MDL-42526 mod_assignment : fix record insert with assigment.id 0
MDL-45565 core_message: Fixed strangers array

Strangers get mixed with noreply user and support user,
if  noreply/support users real user.
To avoid duplication use userid as array index. Also,
avoid fetching data again for noreply and support users,
if they are real users, then data is already feteched.
MDL-45565 core_message: Added unit tests.
MDL-45686 qtype_multichoice get_num_selected_choices return wrong result
MDL-45499 admin: fixed error when displaying page settings
MDL-45607 events: changed the context passed to the user_profile_viewed event
MDL-45623: Fix assigned users count on role delete confirmation page
MDL-45635 javascript: Make core dialogue translatable
MDL-45660 question statistics: make comparison more robust.
MDL-45192 assign: added behat script & new definitions to handle alert dialog

The behat script is to test the batch action to lock and unlock submissions.
The new definitions are to prevent the "unexpected alert open" error in Selenium.
MDL-45192 behat: Replacing specific-selector steps by a generic one

Having a I click on we can use all our selectors rather
than having multiple steps for the same purpose. This
step allow us to manage JS native dialogues without
having to fail a scenario.

Credit for Mohamed Alsharaf.
MDL-45650 events: ensure correct objectid passed when triggering user_profile_viewed event
MDL-45675 mod_data: initialise options as an empty array to avoid error when there are none
MDL-33763 notes: Fix issue with incorrect node highlighting in the nav tree
MDL-45676 mod_data: added missing additional name fields
MDL-45677 mod_assign: removed treatment of an array as an object
MDL-44014 Navigation: Set the correct context when retrieved via AJAX