Twelve boys and their football coach who had been missing for more than a week in a cave in northern Thailand have been found alive, officials have said.