Australia opener David Warner hit his 21st Test century in dramatic circumstances in the fourth Test against England in Melbourne on Tuesday.