Handle 0-length vector results correctly.

If a vector-returning function returns NULL, that might be an error or
it might be because the list it's returning is actually empty.
Call sg_get_error to distinguish the two cases.

This is a bit awkward; see libstatgrab issue #17 for more discussion.