Kohei Uchimura pulled off a stunning last-gasp victory to retain his men's all-around Olympic gymnastics title at the Rio Games on Wednesday.