Insights into reactivity and defect properties of semiconductor surfaces from first-principles computations