Fixed #23152 -- Added support for transactional Spatialite metadata initialization.

Thanks Doug Goldstein for the initial patch.