Fix compiler warnings on Cygwin and Mac OS X.

* Don't use PIE/PIC on Cygwin/Darwin unless specified as these
  platforms don't support it.
* Cleanup warnings for 'make check' build.
* Fix a bunch of isdidigt/isalpha/etc. type warnings about char subscripts.
  Based on the recommendation of http://stackoverflow.com/a/10186479/89101
  they now all contain casts to usigned char.
* Fix the type issue for gesockopt calls.
* Fix enum warnings in Yahoo libs on Mac OS X.
`(unsigned int)`? Manpage here says both "int" and "unsigned char", sigh...