M:B::Unix: protect against getpwnam not being available

Also resort to using glob("~") as a last ditch effort if everything
else fails.
Android hints: In native builds, add -L/system/lib to ldflags

This is just a safety net against the linker being weird.
Configure: Check for getpwuid and getpwnam

Previously we only checked for the reentrant versions and assumed that if
the system was Unixy, it'd have the normal ones.

Unfortunately, there are exceptions to that list, like Catamount or
Android; this commit acts like groundwork to do the right thing for those
platforms, by making Configure actually check that they exist.
config.h: Define HAS_PASSWD here, not in unixish.h

This way we can conditionally define it depending on whether the system has
getpwnam and getpwuid.

This is particularly important for android, which is a unixish system
but doesn't have those functions.
Worse still, it actually DOES have the reentrant versions, which caused
several issues to threaded builds.
regened uconfig.h