Improvements to getifaddrs interface and added more getifaddrs-related convenience functions. Updated tests accordingly.