Revert "lib: Improve the performance of memcpy and memmove of the general version"

This reverts commit 0dd9d7ffdec236415d8a4838e467c9e4104e7ba1.