Diedhiou fires hat-trick as Senegal, Morocco book final-round places