On the defect structure and electronic properties of titanium disulfide