Network backend: Use getaddrinfo instead of gethostbyname
Network backend: Use getaddrinfo instead of gethostbyname

This has multiple benefits:
- gethostbyname is not thread-safe, and its thread-safe variant is
  a GNU extension. getaddrinfo on the other hand is thread-safe.
- gethostbyname has been removed in POSIX 2008.09, and was already
  deprecated in POSIX 2001.01.
- By using getaddrinfo, the network backend should now be able to
  connect to IPv6 addresses (untested).

Signed-off-by: Paul Cercueil <73d292422978d45c9eeef455bb1b24a0db453722@analog.com>

sensarliar/libiio,analogdevicesinc/libiio,Sunderfield/libiio,Sunderfield/libiio,sensarliar/libiio,gburca/libiio,Sunderfield/libiio,analogdevicesinc/libiio,gburca/libiio,analogdevicesinc/libiio,gburca/libiio,sensarliar/libiio,analogdevicesinc/libiio