Implement file locking in CdmFileIOImpl.

A CdmFileIOImpl object must aquire a lock before it can open a file. This
prevents mutiple objects from reading/writing the same file at the same time.
The lock is released when the open failed, or when the CdmFileIOImpl object is
Close()'ed.

Implementation detail: Since CdmFileIOImpl object totally lives on the main
thread. We don't need any real mutex/lock. Having a global lock map shared by
all CdmFileIOImple objects is sufficient.

BUG=324134
TEST=Updated ReopenFileInSeparateFileIO test passes. Also ReadExistingFile test
covers the scenario where the lock is released when a CdmFileIOImpl is
Close()'ed.

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

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