log/syslog: fix race in test between channel close and accept.

Fixes issue 4769.

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