When grades are deleted, it needs to know the context so any files in the gradebook can be deleted. This means module delete_instance functions must delete the grade_item before they delete the module record.