net: keep lookup IP stuff close

Also flattens import declaration.

R=golang-dev, alex.brainman
CC=golang-dev
https://codereview.appspot.com/13373046