Fix a race condition in bufReader.

The race condition cen be detected by running existing bufReader tests
with Go's race detector.