England are the first team to win a Test match by an innings after conceding more than 500 runs.