A New York Times investigation found that the American air war in Iraq, Syria and Afghanistan has been plagued by flawed intelligence, poor targeting and thousands of civilian deaths.