drive: Add ResourceMetadataStorage::UpgradeOldDB

UpgradeOldDB is responsible to DB version backward compatibility.
When encountering old version DB, it erases all entries except cache entries, canonicalizes IDs and add resource-ID-to-local-ID mapping entries.

Fix ResourceMetadata::AddEntry and ResourceMetadataStorage::CheckValidity to allow resource-ID-to-local-ID entry without corresponding ResourceEntry.
Remove FileCache::CanonicalizeIDs.
Add a new UMA histogram "Drive.InputDBVersion"

BUG=309597
TEST=unit_tests
R=asvitkine@chromium.org, kinaba@chromium.org

Review URL: https://codereview.chromium.org/33533003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230625 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 230625