Add term_realloc() function.