Phase Transition and Second Harmonic Generation in Thiophosphates Ag2Cd(P2S6) and AgCd3(PS4)S2 Containing Two Second-Order Jahn-Teller Distorted Cations.