Cache: also check if the file id is already in the cache during upgrade

Should solve upgrade issues if only some of the configured storages were migrated previously
Cache: more efficient detection for existing entries during upgrade
Merge pull request #2096 from owncloud/cache-upgrade-id

Cache: also check if the file id is already in the cache during upgrade