Refactor mrb_realloc() func in gc.c.