is_valid_ip: Do not raise exceptions on too-long input.
is_valid_ip calls `socket.getaddrinfo` with `socket.AI_NUMERICHOST` on
the potential "ip"; even though IP addresses are not hostnames and do
not use the `idna` encoding, `socket.getaddrinfo` will raise
UnicodeError if the potential "ip" is longer than 63 characters long,
the RFC-mandated max hostname length.
Catch these UnicodeErrors and return false for too-long IPs, rather
than raising an exception.