fix various compilation errors Include gmid.h as first header in every file, as it then includes config.h (that defines _GNU_SOURCE for instance). Fix also a warning about unsigned vs signed const char pointers in openssl.

initial punycode support

s/uri/iri since we accept IRIs

inline should be before type, gcc says clang doesn't seem to care.

switch to Bjoern Hoehrmann UTF-8 decoder It's correct, while my hacked valid_multibyte_utf8 would allow things that aren't technically UTF8.