Thickness-dependent resistance switching in Cr-doped SrTiO3