MDL-24408 extra_answer_fields: fixing on Tim's remarks

Now functions return values instead of changing passed objects.
edit_question_form.php have more comments for nasty code and
better function for overloading.