end a question before doing revealAnswers

On "End Exam", the display code goes through each question and resets the answer inputs to the last submitted answer.
This changes the revealAnswer code to do the same before revealing answers, so that the student's last submitted answer is shown next to their mark.

Fixes #342 - decided not to warn the student about unsubmitted changes, since their mark won't matter anyway.