Fixed #23071 -- Use last migration's name in dependency to other app

Changed the autodetector to lookup the name of the other app's last
migration in the graph and use that as dependency instead of using
__latest__.
Fixed #23088 -- Used `six` `range` type in `Paginator.page_range`.
Improved docs for GEOSGeometry.simplify()
Fixed #22827 -- clarified what each cache middleware does.

Thanks Keryn Knight for the report.
Merge pull request #2938 from dekkers/ticket_23071

Fixed #23071 -- Use last migration's name in dependency to other app
Mark initial_data as deprecated separately from syncdb. Refs #23077.
Fixed #23093: soft application detection for swapped models
Restore support for reading __latest__ for compatability
Fixed #23085: Better error message for PostGIS 1.5/bad custom fields
Fixed #23083 -- Fixed runserver reloading when deleting a file.

Thanks Collin Anderson for the report and hirokiky for the fix.
Fixed bad usage of rstrip() that caused test failure.

If the temporary file name contained a p or y as its last
characters, it would be stripped. refs #23083.
Fixed #23097 -- Switched to new octal format in docs