Replace bytes when uploading to MemoryBufferNativeSurface
Replace bytes when uploading to MemoryBufferNativeSurface

Instead of appending the bytes when uploading to
MemoryBufferNativeSurface, replace them. This fixes issues when calling
upload twice on the same buffer, which can happen if the buffers are
cached externally.

glennw/rust-layers,mrobinson/rust-layers