don't close cache manifest file prematurely

ErrorInvalidFormat is not a fatal error so don't close the cache
manifest file right away but instead let cache_final() handle it.

Fixes the following (very common) warning when running the test suite:

    Warning: Unable to write cache file [..]: unexpected seek failure

The seek failure is an lseek() system call that failed with EBADF
because the file descriptor had already been closed.
93e89b3b7eBen Noordhuis committed on 4/13/2019, 10:33:29 AMparentea5518f
1 file changedLine totals unavailable