libc: krait: support KINGFISHER optimized memcpy

When defined use the KINGFISHER optimized
cortex-a9 memcpy instead to improve performance.

Change-Id: Idcfb94cc1e10d8326d7a9e623baed91125d7caf6
Replace Cortex A15 strlen implementation with cortex-strings

Benchmarks on a Nexus 10 have shown this implementation to be 5%-20%
faster (depending on input)

Change-Id: I4331a390c404a77b1e13909d713c4258a3776bca
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
MemLeak when calling pthread_detach after thread exits

This change is to prevent the memory leak taking place when
pthread_detach is called after thread exits. Here we insert
a check to find the state of thread within pthread_detach
and accordingly reclaim storage.

Change-Id: I5e8ec183e8077c629ace3a4cd7b1e5e0de70e7a4
Import memchr implementation from cortex-strings for Cortex A15

Benchmarks on a Nexus 10 have shown the cortex-strings implementation
of memchr to be 60%-70% faster (depending on input)

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

Change-Id: I72b119905234570e54068375e5c3593d0647c67c