Also add some test cases to test/hostutils for that and a few other
things, and make the test program just act as an ASCII/unicode
hostname converter rather than a test program if it's run with an
argument.
https://bugzilla.gnome.org/show_bug.cgi?id=633350
Functions for converting between UTF-8 IDNs (Internationalized Domain
Names) and their ASCII-Compatible Encodings, plus a function to recognize
IP addresses. Part of #548466.