Create a new in-core index representation, lock it, and read from disk.
The new index will be locked and then read before it is returned to the caller. Read failures are reported as exceptions and therefore prevent the method from returning a partially populated index. On read failure, the lock is released.
@param indexLocation location of the index file on disk.
@param fs the file system abstraction which will be necessary to perform certain file system operations.
@return a cache representing the contents of the specified index file (ifit exists) or an empty cache if the file does not exist.
@throws IOException the index file is present but could not be read, or the lock could not be obtained.
@throws CorruptObjectException the index file is using a format or extension that this library does not support.