Completely disable assertions if NDEBUG is set.

Normally, setting NDEBUG disables the assert function call in assert.h.
This is sufficient if we build everything from source. However, as we're
dealing with a number of precompiled binaries, we can also have binaries
which were compiled with NDEBUG not being set. To achieve the same
effect for those binaries (namely: don't make the program crash),
disable the call to abort() inside the assert functions if NDEBUG is
set.

Change-Id: I545927757ae6e972f1567085715d9a6cb6c46107
Redesign dlopen() locks to be recursive per thread
picked from
https://github.com/android/platform_bionic/commit/f9c5afb1f9d8e615ab98774a10bbf117962db66d
bm: cherry-pick one patch from freebsd to fix logb() denormals issue

picked from
https://github.com/android/platform_bionic/commit/9c9b0fc7e1dff39baa8cdf2536be9776aa4af766
Prevent deadlock when using fork

When forking of a new process in bionic, it is critical that it
does not allocate any memory according to the comment in
java_lang_ProcessManager.c:
"Note: We cannot malloc() or free() after this point!
A no-longer-running thread may be holding on to the heap lock, and
an attempt to malloc() or free() would result in deadlock."
However, as fork is using standard lib calls when tracing it a bit,
they might allocate memory, and thus causing the deadlock.
This is a rewrite so that the function cpuacct_add, that fork calls,
will use system calls instead of standard lib calls.

Signed-off-by: christian bejram <christian.bejram@stericsson.com>

original identificator of the change is Iff22ea6b424ce9f9bf0ac8e9c76593f689e0cc86

picked from
https://android-review.googlesource.com/#/c/21627/
Merge "Prevent deadlock when using fork" into gingerbread
Merge "Redesign dlopen() locks to be recursive per thread picked from https://github.com/android/platform_bionic/commit/f9c5afb1f9d8e615ab98774a10bbf117962db66d" into gingerbread
Merge "bm: cherry-pick one patch from freebsd to fix logb() denormals issue" into gingerbread
Merge "Completely disable assertions if NDEBUG is set." into gingerbread
Merge remote-tracking branch 'cm/gingerbread' into gingerbread