New FILTER_VALIDATE_DOMAIN and better RFC conformance for FILTER_VALIDATE_URL

Introduce a new `FILTER_VALIDATE_DOMAIN` filter to validate domain name and label lengths according to RFCs. It does not check characters.
A `FILTER_FLAG_HOSTNAME` is also available to specifically validate hostnames (they must start with an alphanumeric character and contains only `[a-z-]`). This flag is used in `FILTER_VALIDATE_URL`.

- [x] According to [RFC 1034](https://www.ietf.org/rfc/rfc1034.txt), a domain name label cannot exceed 63 characters
- [x] According to [RFC 1035](http://www.ietf.org/rfc/rfc1035.txt) the total length of a hostname cannot exceed [253 characters](http://blogs.msdn.com/b/oldnewthing/archive/2012/04/12/10292868.aspx) (optional final dot not included)
- [x] According to [RFC 952](http://www.ietf.org/rdc/rfc952.txt) and [RFC 1123](http://www.ietf.org/rfc/rfc1123.txt) a domain name label cannot start nor end with a non alphanumeric char (the current implementation only check the first character of the hostname)
- [x] According to [RFC 2732](https://www.ietf.org/rfc/rfc2732.txt) an IPv6 address enclosed with square brackets is a valid host
- [x] According to [RFC 2181](https://www.ietf.org/rfc/rfc2181.txt) and [RFC 1123](https://www.ietf.org/rfc/rfc1123.txt) a domain can contain underscores but a hostname can't

See bug #68039
Why start the label length at 1 if you haven't read any characters from the string yet?