xarray.cc, xarray.h: use xrealloc instead of realloc; truncate xarray_m in dtor, so that proper dispose method is called.