Rowan Williams, the Archbishop of Canterbury and unofficial head of the global Anglican church, has announced that he will retire at the end of the year.