Fixed #17946 -- Fixed deserialization of self-referencing M2M fields

Thanks Philip Mountifield for the report and excellent analysis, and
Simon Charette for the review.
Added RasterSource/GDALBand GDAL objects

Based on Daniel Wiesmann's raster branch. Thanks Daniel Wiesmann
and Tim Graham for the reviews. Refs #23804.
Fixed #21414 -- Removed RelatedObject and deprecated Field.related.
Removed model_package test dependency on contrib.sites
Removed admin_util test dependency on contrib.sites
Removed unneeded null param to ManyToManyField
Fixed #24037 -- Prevented data loss possibility when changing Meta.managed.

The migrations autodetector now issues AlterModelOptions operations for
Meta.managed changes instead of DeleteModel + CreateModel.

Thanks iambibhas for the report and Simon and Markus for review.