Accelerating inverse crystal structure prediction by machine learning: A case study of carbon allotropes