Implement HAVE_GETHOSTBYNAME__R_* platform compile tests
Implement HAVE_GETHOSTBYNAME__R_* platform compile tests

Todo: These generic compile tests could probably be contributed
back to CMake.

davidsansome/python-cmake-buildsystem,thewtex/python-cmake-buildsystem,chuckatkins/python-cmake-buildsystem,python-cmake-buildsystem/python-cmake-buildsystem,adrianbroher/python-cmake-buildsystem,jcfr/python-cmake-buildsystem,msmolens/python-cmake-buildsystem,thewtex/python-cmake-buildsystem