libc: krait: Implement optimized versions of memmove and bcopy

Restore a jellybean optimization for memmove and bcopy on krait.
Code has been refactored to thumb2 for consistency with the rest of
bionic libc, as well as performance and correctness.

Change-Id: I74405587f6cbefd20a5967d99830baec93e790a4
libc: krait: Fix memmove half-word atomicity

In tailing case of less than 7, if even number of bytes are left, then
use half word load/store to make sure the whole routine is half-word
atomic

Change-Id: I54948ac050ff866986a7e144d4240652981ea87a
Fix pthread_detach for already-exited threads.

This fix handles the case when pthread_detach is
called for threads which have already exited.
This is required to avoid any memory leak

Change-Id: I2bf7f41234d93b226132a4c51705f4186f4961c3
Reported-by: Paresh Nakhe <pnakhe@codeaurora.org>
bionic: update memmove for 32 bits atomic

When src/dst are 32bits aligned, the updated memmove will guarantee
32bits atomic.

Change-Id: I21cb77451270d061b32e3e2d2fda22e7e373b7ff
Replace memcpy with the cortex-strings implementation

Benchmarks on a Nexus 10 have shown this implementation to be
up to 12% faster.

Change-Id: I212df99357b338221779cfba118ebfff441c9457
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	libc/arch-arm/cortex-a15/bionic/memcpy.S
Add .cfi_startproc/.cfi_endproc wrapper to memcpy

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Merge branch 'kk4.4' of https://github.com/SlimRoms/android_bionic into kk4.4

Conflicts:
	libc/arch-arm/krait/bionic/memmove.S