net/rpc: shut down connection if gob has error
The nicest solution would be to buffer the message and only write
it if it encodes correctly, but that adds considerable memory and
CPU overhead for a very rare condition. Instead, we just shut
down the connection if this happens.
Fixes issue 7689.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/146670043
testing: clearer comment

Fixes issue 8797.

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/146680043