Move arch specific code for arm, mips, x86 into separate
makefiles.
In addition, add different arm cpu versions of memcpy/memset.
Bug: 8005082
(cherry picked from commit acdde8c1cf8e8beed98c052757d96695b820b50c)
Change-Id: I0108d432af9f6283ae99adfc92a3399e5ab3e31d