Replaced HAS_SPATIAL_DB by testing database feature

Refs #22632. This should be the base for using more database
features to exclude specific backends in GIS tests.
Yes, I'm aware of that change. But as `django.contrib.gis` tests are not run by default now for every project, I don't see that as a problem.