Jon Gruden has resigned as Las Vegas Raiders head coach following the leak of controversial emails sent over the last 10 years.