Persist student answers on input error

LMS-469
pep8/pylint fixes for capa
Merge pull request #1663 from edx/sarina/persist-student-answers-on-error

Sarina/persist student answers on error