remote: move branch upstream deletion to use an iterator This should make it more readable and allocate a bunch fewer strings.