Senegal come from behind to ease past Sudan 3-1 and book their place in the Africa Cup of Nations quarterfinals.