fmt: fix caching bug in Scan
fmt: fix caching bug in Scan

Black box test is too time-consuming, as the bug
does not appear until Scan has processed 2 GB of
input in total across multiple calls, so no test.

Thanks to Frederick Mayle for the diagnosis and fix.

Fixes issue 2809.

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/5611043
abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go,abustany/go