Wales secured top spot in Pool D and booked a quarter-final clash with France by beating Uruguay 35-13 in Kumamoto.