Jon Gruden has resigned as coach of the Las Vegas Raiders after emails he sent before being hired in 2018 contained racist, homophobic and misogynistic comments.