java: Allow ongoing search to be aborted or interrupted by UI-events.
java: Allow ongoing search to be aborted or interrupted by UI-events.

This is done by partitioning the search job into a sequence of shorter
jobs that are sequentially inserted into the normal UI interface
eventqueue. By doing this there are no thread synchronization issues
that need to be resolved, except when a search should be aborted. In
this case the invoking thread blocks on a cancellation boolean until
the eventqueue has processed the search runnable, this signals back
to the invoking thread that the search has been aborted.

ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ccxvii/mupdf,ccxvii/mupdf,ArtifexSoftware/mupdf,TamirEvan/mupdf,ArtifexSoftware/mupdf,sebras/mupdf,sebras/mupdf,ArtifexSoftware/mupdf,ccxvii/mupdf,ccxvii/mupdf,sebras/mupdf,sebras/mupdf,TamirEvan/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,sebras/mupdf,ccxvii/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,ccxvii/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,ArtifexSoftware/mupdf,sebras/mupdf,TamirEvan/mupdf,TamirEvan/mupdf