git-gui: refactor remote submenu creation into subroutine