PatchListLoader: Synchronize MyersDiff and HistogramDiff invocations

To overcome MyersDiff endless loop problem, the computation thread can
be interrupted and set to cancel with Future.cancel(boolean) method.

However it cannot be assumed that after this method returns the thread
is terminated. When the system is under heavy load or/and the thread in
question is in a tight loop, it won't stop. It can be seen with this
instrumentation change in JGit: [1] with the corresponding dump [2].

Synchronize the MyersDiff and alternative HistogramDiff algorithm
invocations to prevent pack file corruption, as WindowCursor.inflate()
method isn't synchronized.

[1] https://git.eclipse.org/r/#/c/57583
[2] http://paste.openstack.org/show/475785

Bug-JGit: https://bugs.eclipse.org/bugs/show_bug.cgi?id=467467
Bug: Issue 3361
Contributed-By: Khai Do <zaro0508@gmail.com>
Change-Id: I4516bcc2c41792acdb8174cb9d3cc198ddfaf8ef
1 file changed