First-principles calculation of structural and thermodynamic properties of titanium boride