Sarina/persist student answers on error

Addresses https://edx-wiki.atlassian.net/browse/LMS-469

Also, pep8 & pylint fixes for good measure.