Add IP address parsing sanity check.

In theory our parser definition already asserts that the IPv4/IPv6
address is valid and parseable, but we can avoid any potential runtime
termination caused by incorrect verification in our own code by *also*
checking for InetAddress's failure (rather than asserting
on it not failing, as we did previously).