mesa: optimize out the realloc from glCopyTexImagexD()