Brings LC_* defs into line with POSIX

POSIX requires that LC_* constants be defined as macros, and libc++ is testing
for this. Source: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html

Change-Id: Id0653e54d74f12179ef88cadf7b5d6ba1bae3cdb
Make uselocale(3) claim its pthread key in an ELF constructor.

pthread_once is nice for decoupling, but it makes resource availability less
predictable, which is a bad thing.

This fixes a test failure if uselocale(3) is called before
pthread.pthread_key_create_lots runs.

Change-Id: Ie2634f986a50e7965582d4bd6e5aaf48cf0d55c8

Conflicts:
	libc/private/bionic_tls.h
Make libc signal handler output more like debuggerd.

This has been annoying me for a while, because it's often quite misleading.

Today, for example, I saw:

  Fatal signal 13 (SIGPIPE) at 0x6573 (code=0), thread 25971 (top)

where the apparent address is actually the pid of the signal source (in this
case the kernel on behalf of the thread itself).

This patch isn't as fancy as strace, but it at least means we never say
anything misleading. We could decode the si_code field like strace and
debuggerd, but I'm reluctant to do that without some way to share the code
between at least bionic and debuggerd.

Examples after:

  Fatal signal 13 (SIGPIPE), code 0 in tid 9157 (top)
  Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 9142 (crasher64)
  Fatal signal 6 (SIGABRT), code -6 in tid 9132 (crasher64)

(Note that the code still shows as 0 for SIGPIPE in the signal handler itself
but as -6 (SI_TKILL) in debuggerd; this is actually correct --- debuggerd is
showing the re-raised signal sent at the end of the signal handler that
initially showed the correct code 0.)

Change-Id: I71cad4ab61f422a4f6687a60ac770371790278e0

Conflicts:
	linker/debugger.cpp
Fix for libgcc compat generation script.

  Taking into account possibility that external symbol
  could have been an OBJECT instead of function.

  b/14090368

Change-Id: Iac173d2dd1309ed53024306578137c26b1dbbf15

Conflicts:
	libc/arch-arm/bionic/libgcc_compat.c
	libc/tools/genlibgcc_compat.py
Remove unused #defines from "arith.h".

These were defined in upstream's per-arch files, so I carried them across,
but they aren't actually used anywhere.

Change-Id: Ica9796201dcd2caa5c34070c0dd226fc2050ba47

Conflicts:
	libc/upstream-openbsd/arith.h