All Thomas Cook shops to be bought by rival Hays Travel in a move that could save up to 2,500 jobs.