Use free(ptr) for GRN_REALLOC(ptr, 0)

Because "realloc(ptr, 0) == free(ptr)" is true only in glibc. Use
free(ptr) is more portable.