Fixed #23812 - Replaced every range and xrange with django.utils.six.moves.range

This effectively converts `range` to `xrange` on Python 2. We have run into subtle issues with this before -- see https://code.djangoproject.com/ticket/23140 for an example. Are you comfortable auditing the places where you made this change to identify possible issues? It may be better to defer these occurrences to a separate ticket.