TS-2546 Move xptr and _xstrdup to ink_memory.{h,cc}