Better fix for relative URLs

An improvement to #2711 

cc @koke 
> The important thing here is that we correctly point to the site's domain so either blogURL or permalink work. 

That was with the old approach, as you would only take `postURL.host`. With `relativeToURL`, you could have `http://example.com/#section1` with blogURL and `http://example.com/2014/11/test-post/#section1` with permalink.