store/storecache: fix cleanup on close error for saveToCacheFile
store/storecache: fix cleanup on close error for saveToCacheFile

Previously, we will cleanup wrong file name when there is an error
on Close since the file is already renamed at that point.

We now close the file before we rename it. So we wont leave any
tmp file around when there is an error.

Change-Id: I2a277fb8919729e9d221fc605624e3e046857f42
Reviewed-on: https://upspin-review.googlesource.com/8558
Reviewed-by: David Presotto <d244755566b06d4c956c05eb7fe29c9fb345f41e@gmail.com>

upspin/upspin,upspin/upspin