xtext: Add word and line selection modes

Similar to a GtkTextView if you double click you enter word selection mode
and if you triple click you enter line selection mode.
Allowing you to drag and select more than a single character.

Closes #1108
Fix DOMAIN and EMAIL patterns.

Closes #1107
Escape values set via pluginpref

Fixes #790
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