Replace FOR UPDATE with LockManager use in LocalFile::lock()

* This avoids excess contention where inserts of rows for
  similarly named files get blocked. This often would effect
  users of UploadWizard or any bot doing mass uploads.

Change-Id: Ie7a328f7d4f03aa249770804417347a50356ea42
Merge "Replace FOR UPDATE with LockManager use in LocalFile::lock()" into wmf/1.24wmf5