Auxiliary functions to parse and validate parts of URIs.
To support URI syntax in the manner of RFC 3986, this adds a self-contained set
of functions to parse (parts of) URIs and to validate such parts using basic
syntax checks.
To avoid blocking while resolving DNS strings, strings that do not have the
characteristics of native IPv4/v6 address strings always pass; a wrong hostname
will then be detected later when connecting.
Note: strictly speaking, this does not deal with URIs, since the 'scheme' part
is missing and only the "locator" part is parsed. It is possible to extend
this later, using something like dccp://host[:port], http://host[:port],
or udp://host[:port] to specify the transport protocols of paraslash.