Fix build issues with clang 3.4

clang 3.4 (just like gcc) implements _Unwind_GetIP - use Bionic's
implementation only if older clang versions are used.

Don't set incorrect values for WCHAR_MIN and WCHAR_MAX when using clang
in c++11 mode (c++11 has a builtin wchar_t that happens to be unsigned
in clang). Signed WCHAR_MIN and WCHAR_MAX defines in clang++ -std=c++11
cause anything using stlport to fail.

Change-Id: I46ed08b873f34e01c5e66aa8d91c71478bfcc25d
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	libc/bionic/debug_stacktrace.cpp
[DO NOT SUBMIT] Use assembly wrapper for three __aeabi mem routines.

__aeabi_memcpy
__aeabi_memmove
__aeabi_memset

Otherwise Clang will generate infinite recursive calls to itself.

BUG: 2216385
Change-Id: I7a2f3afdb191d32570d17b4a0c79804ed8ec9f91
Add strcmp/memcmp testing.

Bug: 9797008
Change-Id: I11b1da060d29f7dacbb53f20a3e2082395b5bd8a

Conflicts:
	tests/buffer_tests.cpp
	tests/buffer_tests.h
	tests/string_test.cpp
bionic: move benchmarks out of tests directory

Change-Id: I4d054965198af22c9a9c821d1bc53f4e9ea01248
Remove harmful attempts to be helpful in pthread_mutex functions.

Most callers won't check for EINVAL, so it's best to fail early.
GCC takes the nonnull attribute as a guarantee that an argument
won't be NULL, so these hacks were already ineffective, which is
how we found that at least one commercial game was using NULL
as if it's a mutex, but actually getting no-op behavior.

Bug: 11971278
Change-Id: I89646e043d931778805a8b692e07a34d076ee6bf
Move bionic over to GCC's 'warning' attribute.

This is a better solution than the old __warn_references because it's
a compile-time rather than link-time warning, it doesn't rely on something
that doesn't appear to be supported by gold (which is why you only used
to see these warnings on mips builds), and the errors refer to the exact
call site(s) rather than just telling you which object file contains a
reference to the bad function.

This is primarily so we can build bionic for aarch64; building libc.so
caused these warnings to fire (because link time is the wrong time) and
warnings are errors.

Change-Id: I5df9281b2a9d98b164a9b11807ea9472c6faa9e3
-03
Properly detect timeout in pthread_mutex_lock_timeout_np_impl

Previously we were checking against a positive errno which
would not be returned from a system call.

Change-Id: I8e3a36f6fbf5ccc2191a152a1def37e2d6f93124