Replace the majority of memcopy with std::copy.

Change-Id: If90ba358ee5256dc1d14a921bf079434de0b6b6d
Merge branch 'reduce_memcpy_usage'

Change-Id: Iba5e43d08068d5fffe15c5a7aec852b25146620e