BT agrees to buy TalkTalk out of administration in deal saving 900 jobs