remote.c: add a function for deleting a refspec array and use it (twice)