Testifying in a civil suit brought by three Salvadorans who accuse their country’s military of torturing them two decades ago, a former U.S. ambassador to El Salvador said Tuesday that the failure of military leaders to rein in murderous troops had been the biggest obstacle to democracy.