Fixed #20922 -- Allowed customizing the serializer used by contrib.sessions

https://code.djangoproject.com/ticket/20922

This is a patch for master.
1.6.x backport will be quite similar (some versionadded/changed differences in the docs).
1.5.x patch: https://github.com/django/django/pull/1488