Etymology of Gringo

Theories about how Latin Americans came to use the term gringo as a disparaging word for foreigners. We can easily rule out the one about the song “Green Grow the Lilacs,” but what about the rest? This is part of a complete episode.