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

sanjosh/sanjos100-tipc,mhennings/marcohennings-go,rdp/rogerpack2005-golang,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,rdp/rogerpack2005-golang,bryanxu/go-zh,rflanagan/reginaldflanagan-project1,bryanxu/go-zh,Triskite/willstone-goclone,webfd/go-zh,rdp/rogerpack2005-golang,rdp/rogerpack2005-golang,mhennings/marcohennings-go,webfd/go-zh,d0f/go-zh,scirelli/scirelli-go,mhennings/marcohennings-go,bryanxu/go-zh,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,webfd/go-zh,sanjosh/sanjos100-tipc,rdp/rogerpack2005-golang,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,glycerine/jeaten-go-arrayof-structof,rflanagan/reginaldflanagan-project1,webfd/go-zh,bryanxu/go-zh,rflanagan/reginaldflanagan-project1,sanjosh/sanjos100-tipc,mhennings/marcohennings-go,Triskite/willstone-goclone,scirelli/scirelli-go,glycerine/jeaten-go-arrayof-structof,Triskite/willstone-goclone,rdp/rogerpack2005-golang,sanjosh/sanjos100-tipc,Triskite/willstone-goclone,bryanxu/go-zh,glycerine/jeaten-go-arrayof-structof,rdp/rogerpack2005-golang,mhennings/marcohennings-go,webfd/go-zh,Triskite/willstone-goclone,Triskite/willstone-goclone,bryanxu/go-zh,scirelli/scirelli-go,d0f/go-zh,bryanxu/go-zh,d0f/go-zh,glycerine/jeaten-go-arrayof-structof,Triskite/willstone-goclone,scirelli/scirelli-go,glycerine/jeaten-go-arrayof-structof,glycerine/jeaten-go-arrayof-structof,scirelli/scirelli-go,bryanxu/go-zh,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,sanjosh/sanjos100-tipc,rflanagan/reginaldflanagan-project1,scirelli/scirelli-go,sanjosh/sanjos100-tipc,d0f/go-zh,Triskite/willstone-goclone,rflanagan/reginaldflanagan-project1,d0f/go-zh,rdp/rogerpack2005-golang,d0f/go-zh,scirelli/scirelli-go,scirelli/scirelli-go,d0f/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,webfd/go-zh,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go