runtime: convert print.c to Go

LGTM=iant
R=golang-codereviews, iant
CC=dvyukov, golang-codereviews, khr, r
https://codereview.appspot.com/135930043
net: add more cases to lookup API test

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/126450043