[FIX] close cursor in ImageCacheDatabase