Mini refactor and test network util

### Changelog
* Mini module refactor.
* Add tests for all functions not requiring network access.

### Note
Why do we need a separate `get_my_ip` function? Doesn't `stun.get_ip_info` give us all we need?
That's not an implicit import. It's an import of the module instead of the class name. See the relevant [entry](https://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=Imports#Imports) in the Google Python Style Guide.