Replaced IPvXAddress with the more generic Address.

Replaced to4() with toIPv4().
Replaced to6() with toIPv6().
Replace isIpv6 with getType() and throw error if unknown.