Refactor filtering and mapping for url extraction

We make a few changes to the URLs we extract such as filtering out
URLs that don't match a certain predicate and adjusting the values
that we hold.

This change converts these operations to use a common set of
`filterURLs` and `mapURLs` functions that can be passed a function to
call for each item in the array of *url.URL elements.
Should we make this specific to URLs, or is there value in generalising this function and moving it to the 'util' package so that it can be used on any array of interfaces. It might have a signature such as:

`func mapArray(items []interface, mapFunc func(i interface) interface) []interface`