A quantitative method to project the probability of the end of an epidemic: Application to the COVID-19 outbreak in Wuhan, 2020