android: don't pass -pthreads to the toolchain

The android toolchain doesn't recognize the -pthreads argument so we
skip the check as done for cygwin and darwin already.

From Robert Bragg <robert@linux.intel.com>
Include missing headers when checking res_query from
 bind

When we fail to find a libresolv and fallback to checking libbind for
res_query() we still need to include the following as we do for the
libresolv checks:

 #include <sys/types.h>
 #include <netinet/in.h>
 #include <arpa/nameser.h>

This patch makes sure to pass those include directives to AC_TRY_LINK

From Robert Bragg <robert@linux.intel.com>
android: avoid dereferencing lconv->decimal_place

Android's shim locale.h simply declares the lconv struct as:
struct lconv { };

When building on android we simply define the decimal point character to
be "."

From Robert Bragg <robert@linux.intel.com>
utils: avoid redundant set/endpwent around getpwuid

set/endpwent are only required for iterating through passwd entries
using getpwent(). Since we are explicitly requesting a passwd entry for
a uid then the set/endpwent calls are redundant.

Removing these redundant calls is required for building on Android since
their C library doesn't implement these.
android: avoid dereferencing pw_gecos passwd member

Android's passwd struct doesn't include the pw_gecos member so we skip
trying to fetch the user's real name on android.
gio: deactivate domain name resolution
gio: remove legacy call (removed from POSIX 2000.1)
glib: don't add -pthread for android
gio: add missing libraries for tools
gunixmounts: correctly flag hasmntopt usage

https://bugzilla.gnome.org/show_bug.cgi?id=697365
gunixmounts: remove warning on unused variable

https://bugzilla.gnome.org/show_bug.cgi?id=697367
configure.ac: add _GNU_SOURCE define for android