net: make protocol-specific WriteTo, WriteMsg methods return error instead of crash

R=golang-dev, dave, rsc, adg, bradfitz
CC=golang-dev
https://codereview.appspot.com/11809043