In kore_realloc() copy a minimum of old or new length bytes.