The thermodynamic stability and mechanical properties of TiC x N1−x (0 ⩽ x ⩽ 1) compounds by cluster expansion method and first-principles calculations