Improve the way we get the local IP address.

Previously we did a reverse lookup our hostname, which fails if the
device does not have a host name.

Now we iterate through our network interfaces looking for the first one
that is IPv4 and not a loopback address.

See this golang thread for discussion:

https://groups.google.com/d/msg/golang-nuts/WXKmB1MI-6g/X6CQzqzuC4YJ
Check error result of http request.