xbps_binpkg_{arch,pkgver}: return a buffer of matched string instead.

... otherwise will pass an invalid pointer to free(3) later on.