Change the django.contrib.auth.views to be classed-based.

I adapted the class-based auth views from [django-authtools](https://github.com/fusionbox/django-authtools/blob/master/authtools/views.py) to be fully backwards-compatible with the function views.

This pull request addresses [ticket #17029](https://code.djangoproject.com/ticket/17209).