sha1-file: use loose object cache for quick existence check