use QgsCredentials to request wms/ows credentials on demand and wms cleanups (fixes #11184)