Nigeria and Morocco each came through tough assignments to set up a mouthwatering Africa Cup of Nations semifinal.