Use url.URL struct type when passing URLs

Use the `url.URL` struct type[1] when passing URLs either as function
arguments or return values.

This allows us to remove some duplicated code when checking for URL
parsing errors and gives greater flexibility to manipulate and interpret
the URLs passed.

Also, DRY up the tests by re-using `rootURL` and by making test URLs use
`www.gov.uk` consistently.

[1]: http://golang.org/pkg/net/url/#URL