CIA Director Petraeus resigns, cites extramarital affair