Refactor ipv4 validation

Previously, it was possible that get_ip_of_node
might return an ipv6 address. I found that this
caused failures so this patch adds a check that
will try to return the first non-private ipv4
address.

This commit also refactors the public address
valdation code to just use the built in method
from iPy.
Merge pull request #5 from bodepd/ipv4

Only return ipv4 addresses