Move refspec parser from connect.c and cache.h to remote.{c,h}