About 5,000 Cuban migrants are stranded in Costa Rica because two countries, Nicaragua and Guatemala, refuse to give them free transit through their territory.