A trove of documents lays bare how the U.S. air war has been marked by deeply flawed intelligence, rushed and often imprecise targeting and the deaths of thousands of civilians.