Lionel Messi added more history to his World Cup legacy, as Argentina survived a scare in the Round of 32 against Cape Verde.