Senate confirms Petraeus as Afghan war chief