The Doctor meets his two former selves as he fights to save his fellow Time Lords from a deadly enemy.