(maint) Remove duplication of IP address parsing

Prior to this commit, the IP address fact for multiple platforms each
parsed out the IP address from the `ifconfig` output. The Solaris
version of this fact also checked for an invalid IP address from bonding
interfaces. This commit consolidates that logic to a single helper
method, and also does the invalid IP address check for all the platforms.