The Archbishop of Canterbury Justin Welby has resigned after thousands of people signed a petition calling for him to step down.