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.
Merge branch 'MDL-32616_26' of git://github.com/timhunt/moodle into MOODLE_26_STABLE