[Validator][2.0+] Fix url validator for single part urls 

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #3207
| License       | MIT
| Doc PR        | N/A

The UrlValidator does not currently accept single part urls `http://localhost/`, and in my opinion should accept urls with a trailing `.` given that they're still valid.

I'm not 100% sure if the regex change I made is the most efficient way to achieve this fix and quite willing for feedback. Regexes are scary!

As a side note: why isnt this validator using filter_var given it can filter IPv4, IPv6 and hostnames?