Improve detection of already loaded libraries

Linker is now able to resolve symlinked libraries correctly.

soinfo is extended to save the graph of dependencies during
load/unload. Dependencies are used only in CallConstructor.

Bug: 9741592
Change-Id: Id9c48a74c46aa89bcdf3d54ec2f8ba3d398130b1
Move libstdc++ into libc.

The Android build system always links against libstdc++.so anyway. Having
operator new and operator delete in a separate library means we can't use
constructors and destructors on heap-allocated objects inside the C library,
which is quite an unfortunate limitation.

This will be cheaper too; on LP64 we can stop linking against the [now empty]
libstdc++.so giving the dynamic linker one less library to worry about for
every process.

There's precedent too --- we already have no libpthread or librt.

For now I'm leaving the include files where they are, and I'm generating a
dummy libstdc++.so and libstdc++.a. We can come back and clean that up later
if all goes well.

Bug: 13367666
Change-Id: I6f3e27ea7c30d03d6394965d0400c9dc87fa83db
Scrub uapi headers slightly harder.

There's no point having always-false tests. It just makes the headers
harder to read.

Bug: 11560081
Change-Id: I6187755e1514ca9ff5642b3c1b0489f22edddaf5
Register _cleanup function with atexit

 * Register cleanup function with atexit
   instead of calling it explicitly on
   exit()
 * abort() no longer calls _cleanup:
   Flushing stdio buffers on abort is no
   longer required by POSIX.
 * dlmalloc no longer need to reset cleanup
   (see above)
 * Upstream findfp.c makebuf.c setvbuf.cexit.c
   to openbsd versions.

Bug: 14415367
Change-Id: I277058852485a9d3dbb13e5c232db5f9948d78ac
Merge "Improve detection of already loaded libraries"
Merge "Scrub uapi headers slightly harder."
Merge "Register _cleanup function with atexit"
Fix comment typo.

Change-Id: I1909f724826b531daf14fec4853e40d578fc0f59
Merge "Fix comment typo."
Merge "Move libstdc++ into libc."
With libstdc++ in libc, __futex_wait and __futex_wake can be hidden.

This patch is conservative and just touches LP64. (But not because we
know of anyone using this in LP32.)

Bug: 13367666
Change-Id: Id45652debc4534584479b16b501401f6f23acea9
Merge "With libstdc++ in libc, __futex_wait and __futex_wake can be hidden."
Hide __futex_wake_ex and __futex_wait_ex.

Also remove some cruft that isn't needed now we're using uapi headers.

Bug: 11156955
Change-Id: I936b9c5b01d8bd6bfb2e5bc0e3f86cd86739cc04
Merge "Hide __futex_wake_ex and __futex_wait_ex."
Remove dead code.

This doesn't exist upstream.

Really we should upgrade to the current arc4random, but that's a bigger
job for another day.

Bug: 11156955
Change-Id: If6cd41b79139c64c17e81999e246cf4f00882ce8
Hide various debug malloc implementation details.

Bug: 11156955
Change-Id: Ib9d69d49ecec8eff4f12392bde94d843ae53d442
Hide __signalfd4, used to implement signalfd(3).

Bug: 11156955
Change-Id: I50842279cb5b32ec8bd45193435574e415cd806e
Merge "Hide __signalfd4, used to implement signalfd(3)."
Merge "Remove dead code."
Merge "Hide various debug malloc implementation details."