Android hints: Detect stub functions and mark them as undefined.

Bionic implements several functions as stumps that simply warn
and return null, which leads to situations like this:

FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378

This commit introduces some probes for functions (getnetbyname,
getnetbyaddr, getmntent, getprotobyname, getprotobynumber, endpwent,
ttyname) that we use and are actually stubs in at least some
versions of Android.
If we find a stub, we pretend that the function is undefined, so
the above example becomes this:

Unsupported socket function "getprotobyname" called at -e line 1.

Note that this commit does not fix the modules that assume that
these functions are always available, so 'make test' still fails.
android hints: Always define d_libname_unique
hints/linux-androideabi.sh: getservent_r() is a partial stub, mark it as undefined to avoid issues with threads
hints/linux-androideabi.sh: Rather than relaying on adb, save the exit status in a file and then copy it over
hints/linux-androideabi.sh: sed might not understand "\r", use $tr instead
hints/linux-androideabi.sh: adb takes care of creating the target dir on the target
hints/linux-androideabi.sh: use $cat instead of plain cat
hints/linux-androideabi.sh: use $chmod instead of plain chmod
hints/linux-androideabi.sh: If the host OS is darwin, set firstmakefile to GNUmakefile
Android hints: Only set userelocatableinc if it doesn't have a value

Without this, Configure would've bailed out if trying to build a
-Duseshrplib perl.
Android hints: Only use adb if $targetrun is set to adb

This loses us some DWIMnery, but allows cross-compiling to
android using ssh, which is much easier to set up than getting
the SDK.
Make compiling with adb work again
Android hints: Set osvers to getprop ro.build.version.release
Android hints: Add m to libswanted
Android hints: When Configure finishes, turn $^O into 'android'

During Configure, we want it to be linux-android, so that
it'll also go through all of the linux checks.
Configure, Android hints: Changes to allow native builds
Android hints: In native builds, add -L/system/lib to ldflags

This is just a safety net against the linker being weird.
Android hints: Clean up some files if cross-compiling with adb
Android hints: load the linux hints to get those defaults
Android hints: Set d_csh to undef in cross builds