MDL-44760 editor_atto: Address issues with focus when closing menus

Safari fires it's events in a slightly different order for the focusoutside
event which causes the focusAfterHide to be called *after* we change focus.

As a result, we must keep track of the menus which are currently open and
remove their focusAfterHide.
MDL-44070 core_completion: Fixed behat
MDL-44070 Behat: Fixed restrict_activity_by_date.feature
Merge branch 'MDL-44760-master-2' of https://github.com/andrewnicols/moodle