Attack on Hindu tourists in Kashmir had India and Pakistan on the brink of an all-out war before a ceasefire took hold.