Adaptively driven X-ray diffraction guided by machine learning for autonomous phase identification