Rescuers have got the first of the boys safely out of the flooded cave in Thailand where they have been trapped for two weeks.