The shooting down of two American warplanes was the most serious example of Tehran’s ability to raise the cost of the war for Washington.