Replace the majority of memcopy with std::copy.

Change-Id: If90ba358ee5256dc1d14a921bf079434de0b6b6d
Merge branch 'reduce_memcpy_usage'

Change-Id: I84eebb6a70b3433eccb878461b1401eaf58b0d95