Try opening URLs with the preferred app

We already did this when the URL was entered in the address bar, now
also do it when it comes from a link in a webpage.

Makes mailto links work and fixes #6236.