utils.localinterfaces: Add PUBLIC_IPS to consolidate socket logic
utils.localinterfaces: Add PUBLIC_IPS to consolidate socket logic

Consolidating IP detection in this module will let us remove
socket.gethostbyname_ex calls from other modules and ensure that
everyone agrees on what our public IPs should be.

ipython/ipython,ipython/ipython