[api] add commodity functions to convert to/from strings/sockaddress
functions are nothing more than wrappers for getnameinfo and getaddrinfo
with some sanity checks, but exposing them around saves lots of
maintanance of duplicate code across different stuff.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>