Petraeus resigns after reported affair with Dilworth author