Prevent NPE when comparing an untracked file with the index
The compare request does not currently check whether a file is in
the index before displaying the compare editor. This causes
problems when the editor tries to ask the revision for its content
and JGit is unable to return something meaningful here because a
blob cannot actually be found. The fix is to check if an entry
actually exists in the index before trying to create a compare
editor input from it.
Change-Id: I9a1b8bd39aded3dcdeaf523b735f5fcf66f8d152