Refactor student views

Fix pylint/pep8 warnings, use JsonResponse instead of HttpResponse where useful,
put in TODOs to change HTTP status codes to be more accurate.
Merge pull request #2526 from edx/db/refactor-student-view

Refactor student views