Ivory Coast made history by winning their third Africa Cup of Nations (AFCON) title, beating Nigeria 2-1 in a thrilling final in Abidjan.