Fix issue with regrading adaptivenopenalty attempts.

We need to store whether penalties are to be applied as part of the
first step, to ensure that the question is re-initialised properly when
it is reloaded from the database.
Add behaviourtype class required by Moodle 2.6.
Update version.php for the 3.2 release.