The US agreed to resettle an unspecified number of refugees being held in Papua New Guinea and the tiny South Pacific island nation of Nauru on Australia’s behalf, under a deal to be administered by the UN refugee agency.