MDL-32616 question engine: move unit test to better name
MDL-32616 question engine: set_max_mark_in_attempts MySQL perf

The MySQL (& Maria DB) query 'optimizer' was failing to handle this
query, so for that DB only, we give it an equivalent query that it can
get right.

With unit test.
MDL-43245 Lesson: non editing teacher cannot grade lesson essay
Merge branch 'MDL-32616' of git://github.com/timhunt/moodle
Merge branch 'MDL-43245' of git://github.com/jmvedrine/moodle