Fixed #23483 -- Prevented ImproperlyConfigured with dotted app names

Made sure the app labels stay unique for the AppConfigStubs, so
migrations wouldn't fail if two dotted app names has the same last part
(e.g. django.contrib.auth and vendor.auth)