Lionel Messi and Barcelona president Josep Bartomeu shook hands on a new deal for the striker, ending months of speculation.