Remote: don't mix allocators

We cannot ask libgit2 to free the memory we have allocated ourselves, as
it cannot know how to do it. Let's free the strarray ourselves.
Clean up after the tests