Transition from antiferromagnetic Kondo metal to mixed valence semiconductor in Ce(Pt1−xNix)Sn