Fixed #23399 -- Optimized django.utils.http.int_to_bas36()

Thanks liminspace for the patch and Keryn Knight for benchmarking.