Turn server fixes (malformed uris and FF NS_ERROR_UNEXPECTED)

These commits contain 2 changes (fixes) regarding UA construction with turn servers.
For details have a look at the commit messages for each. If you want me to squash let me know.
(And of course if I made a mistake or you want me to change something or if I should provide more information).

Cheers