Rename copy_unsafe! to unsafe_copy! and export it (#2871).

Also add a version of unsafe_copy! that works with pointers,
and acts as a memcpy wrapper.

I have not added this to the list of deprecations since the function
was not exported until now.