Gates takes helm at Pentagon as differences over Iraq sharpen