Machine learning for materials analysis, process optimization, and defect detection in additive manufacturing: A review