Move IP testing functions to satori/utils.py

Other modules could want access to these functions in the future
and this cleans up satori/discover.py.

Change-Id: I6954e073c16150e90525218d1d8a15525db70110