[MEDIUM] config: rework the IPv4/IPv6 address parser to support host-only addresses

The parser now distinguishes between pure addresses and address:port. This
is useful for some config items where only an address is required.

Raw IPv6 addresses are now parsed, but IPv6 host name resolution is still not
handled (gethostbyname does not resolve IPv6 names to addresses).
3 files changed