net: don't error when marshalling nil IP addresses

See https://code.google.com/p/go/issues/detail?id=6339#c3

Fixes Issue 6339

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/13553044