Optoelectronics and defect levels in hydroxyapatite by first-principles.