Fix issues with ArrayCopy
C++ was not resolving the overloads of ArrayCopyImpl
as expected,
which was causing ArrayCopy
to sometimes use a less efficient method
for copying.
Also fix an issue with Buffer::DeepCopy
that caused a deadlock when
copying a buffer that was not actually allocated anywhere (as well as
failing to copy the metadata, which was probably the whole point).