Investigation of X2CdS4 (X=Dy, Tm) spinels for energy harvesting and spintronic applications