Fix opening utf8 urls on OSX

- Escape hostnames with punycode
- Use proper encoding when launching open
Detect utf8 urls

They might not be valid, but like many things they are still used
Correctly open URLs with non-ASCII characters on Windows.

Fixes #1023
Use PlaySoundW to play sounds on Windows.

Fixes #1133
Fix out of source builds

Fixes #1018
win32: Fixed build break due to 7a4a024
Replace some unsafe usage of strncpy

Ensure everything is null terminated
Increase max len of chiper names

For example ECDHE-ECRSA-AES256-GCM-SHA384
Fix missing header

And just use g_snprintf() while at it..
Merge branch 'master' of https://github.com/hexchat/hexchat