Reduce number of memory allocations in msg.Copy

Right now we allocate memory even for empty slices. This is inefficient, sticking "nil" as a slice is good enough if there are no items.