MDL-32188 question engine: behaviour static methods -> new classes

It was always a bit of a hack to use static methods on the
qbehaviour_whatever classes to return metadata about the behaviour. It
is better design to have real qbehaviour_whatever_type classes to report
that metadata, particularly now that we are planning to add more such.

For example, inheritance works better with real classes. See, for
example, the improvements in
question_engine::get_behaviour_unused_display_options().
MDL-32188 question engine: make behaviour changes backwards compatible.

With these changes, old behaviours will continue to work. There will
just be some developer debug output to prompt people to upgrade their
code properly.
MDL-32188 quiz/question: behaviours can add to the review summary.

At the top of the quiz reivew page, there is a table that summarises
infomration about the quiz attempt as a whole. For some question
behaviours, we would like to be able to add additional information to
that summary.

This commit introduces a generic method for the behaviour to provide
summary information about an entire question usage.

Then, it provides an initial implementation of some of the summary
information that we would like the CBM behaviours to generate.
MDL-32188 question rendering: let behaviours control mark display.

Then use this in the CBM behaviours to change how the question marks are
displayed there.
MDL-32188 question CBM: add a help icon to the certainty choices.
MDL-32188 question CBM: new behaviour where submitting == selecting certainty

This is just work-in-progress. The display is right, but the processing
after the submit button has been pressed has not been implemented yet,
and the unit tests are currently wrong.

This has to be a new behaviour, rather than a modifcation of
qbehaviour_immediatecbm, because the format for the submitted data is
different, and it would be almost impossible to do a databse upgrade
script.
MDL-32188 question CBM: improve handling of partially correct marks.

It is too harsh to penalise a partially correct score with full
certainty by doing a linear interpolation between -6 and +3. Instead,
any partially correct score (e.g. 0.5) becomes that fraction of the
correct score (e.g. 0.5 * 3 = 1.5). Also, any incorrect score is treated
as -2, so if you have a multiple choice question that normally gives a
negative score for a wrong choice, this will now never give a score of
less than -6.
MDL-32188 question cbm: compute more attempt summary statistics

We now compute the average CBM score, accuracy, CBM bonus and enhanced
accuracy, both for the entire quiz, and for just the questions answered.

Note that the formula for CBM bonus is currently wrong, but I don't want
to add the *0.1 BONUSFACTOR until I understand where it comes from.

Also, the computation of $accuracy is also not correct. It is not a
proper weighted sum.

Frankly, all this code is yucky, I need to rewrite it.

Note that there is a subtlety to be aware of in these calculations. You
need to make sure they work correctly in the presence of descriptions,
ungraded questions, and manually graded questions. For example, imagine
a essay added at the end of the quiz "Summarise what you learned
attempting this exercise." This might have max mark zero or non-zero.
The CBM statistics should just ignore question like that.