[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 also not sure why it isng using filter_var??