Make the memcpy functions work with Thumb2 and optimize it

The optimized memcpy function is made to work and optimized for
Thumb2 mode. Thumb2 mode turns out to be perhaps a little faster
with reduced code size, so there's no performance penalty. The
fast path for word aligned copies takes advantage of 16-bit
ldmia/stmia instructions (enabled by carefully selecting
registers) to reduce code size.