Add ability to update code mod instances.

Also added an export_record() method to code_challenge instances to work
around Moodle's ridiculous inconsistency in mod forms.