Refactor git_StringArray.

We now assert if there is an object in the array which isn't a string.
We also create an strarray on the stack before returning a copy on the
heap.