Fix mysql error in migration on the unique constraint for the location column (too large).

Introduced a location_sha1 to contain a hash of the location string and test uniquness against.
Merge pull request #688 from hudmol/fix-external-document-migration-in-mysql

Fix error in 014 external document migration (MySQL)