MDL-40493 editorlib: Update editor_get_preferred_format

This change makes the editor_get_preferred_format function
return the preferred format of the users preferred editor.
MDL-40493 editor: Update behat tests
MDL-40493 editors: Lang string change
MDL-40493 editors: unit tests for editor_get_preferred_editor
MDL-40493 User preference: Allow users to set their preferred text editor.

This changes the setting htmleditor in the user preferences from a 0 or 1 column
to the name of their preferred text editor. Existing preferences are updated if
the site is upgraded, but the function can also handle old data in the case of
restored user backups.
MDL-40493 editorlib: Remove silly array_reverse calls