Japan stun two-time champions South Africa to cause arguably the biggest upset in rugby union history.