Don’t let Petraeus’s scandal obscure his achievements