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__.
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.