go.talks/pkg/socket: sanitize message bodies

This change prevents a socket connection from going down when a program
emits garbage, as the JSON encoder chokes on invalid UTF-8.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/8589051
1 file changed