netchan: fix locking bug. There's no need to hold the client mutex when calling encode, since encode itself uses a mutex to make the writes atomic.  However, we need to keep the messages ordered, so add a mutex for that purpose alone. Fixes issue 1244.
netchan: fix locking bug.
There's no need to hold the client mutex when calling encode, since encode itself
uses a mutex to make the writes atomic.  However, we need to keep
the messages ordered, so add a mutex for that purpose alone.
Fixes issue 1244.

R=rsc
CC=golang-dev
http://codereview.appspot.com/2833041

wesolows/golang,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang,wesolows/golang,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang-old,wesolows/golang,wesolows/golang-old,wesolows/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang-old,firebitsbr/golang-old,wesolows/golang,wesolows/golang,wesolows/golang,wesolows/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,firebitsbr/golang-old