Avoid memcpy but still retain write buffer.

This change maintains the "no copy" semantics but retains the original
buffer using the objc runtime. When the write completes, the original
buffer is released.