Thermodynamics of formation of Th-Ni alloys