rtld: Sync memory allocation with FreeBSD
Taken from:
FreeBSD SVN 233306 (22 March 2012)
FreeBSD SVN 233307 (22 March 2012)
FreeBSD SVN 233357 (22 March 2012)
Remove unused CalTech #ifdef fragments.
Use xmalloc() instead of malloc() in the places where malloc() calls
are assumed to not fail. Make the xcalloc() calling conventions follow
the calloc(3) calling conventions and replace unchecked calls to calloc()
with calls to xcalloc(). Remove redundand declarations from xmalloc.c,
which are already present in rtld.h.
Implement xstrdup() using strlen()/xmalloc()/memcpy() already presented
in rtld, instead of pulling in libc strdup().