At least 640 Nigerians have signed up to take free flights home from South Africa after xenophobic attacks on foreigners.