Parameters of utility functions are now passed by reference where it's possible

urlEncode, urlDecode, hostFromUrl, resourceFromUrl signatures modified
Asserts for incorrect url in getHostPosition added
Tests for invalid url passed to hostFromUrl added