Memory leak during automatic merge operations from EGit

Properly dispose of the IMergeContext after we're done merging files so
that it doesn't stay registered against the workspace for notifications
on new file diffs.

Only clear invalidated entries in the EMFModelProvider's cache after
we've tried to access it (the cache's cleanup is done on access so we
might get a hit if we try to find our entry while we could have had a
miss if we took the time to clear beforehand).

Change-Id: Ia3fd49cf1531f02077e00956f6a79e35d24024cb
2 files changed