Streamline singleton behavior in a class QgsSingleton

If a singleton is unused in an application, it's not going to be created just
to be deleted instantanously on app exit.
QgsCoordinateTransformCache will also be cleaned on exit.