jni: Clear java exception when rethrow via fz_throw().
jni: Clear java exception when rethrow via fz_throw().

Previously when a java exception was pending CallObjectMethod()
was called. This is not permitted and so the exception must be
cleared before this function is called.

Secondly if the method called by CallObjectMethod() throws an
exception this exception was left pending when fz_throw() for
unknown java errors was called. Later on jni_rethrow() would
be called which in turn called ThrowNew(). This is not
permitted either, so the pending exception must be cleared
if caused by the call to CallObjectMethod().

Because fz_throw_java() always ends with a fz_throw() it is
safe to assume that the pre-existing exception (or the one
caused by CallObjectMethod()) will always be converted into
a fz_throw(), which in turn will be converted back to a java
exception since all calls to fz_throw_java() are enclosed in
fz_try() where fz_catch() ends with calling jni_rethrow().

TamirEvan/mupdf,TamirEvan/mupdf,knielsen/mupdf,ArtifexSoftware/mupdf,sebras/mupdf,fluks/mupdf-x11-bookmarks,TamirEvan/mupdf,knielsen/mupdf,fluks/mupdf-x11-bookmarks,ArtifexSoftware/mupdf,ccxvii/mupdf,knielsen/mupdf,ArtifexSoftware/mupdf,fluks/mupdf-x11-bookmarks,TamirEvan/mupdf,ccxvii/mupdf,poor-grad-student/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,sebras/mupdf,muennich/mupdf,sebras/mupdf,fluks/mupdf-x11-bookmarks,muennich/mupdf,knielsen/mupdf,poor-grad-student/mupdf,knielsen/mupdf,ccxvii/mupdf,sebras/mupdf,muennich/mupdf,muennich/mupdf,TamirEvan/mupdf,muennich/mupdf,ArtifexSoftware/mupdf,muennich/mupdf,sebras/mupdf,TamirEvan/mupdf,fluks/mupdf-x11-bookmarks,ArtifexSoftware/mupdf,ccxvii/mupdf,TamirEvan/mupdf,poor-grad-student/mupdf,poor-grad-student/mupdf,TamirEvan/mupdf,muennich/mupdf,ccxvii/mupdf,ArtifexSoftware/mupdf,fluks/mupdf-x11-bookmarks,poor-grad-student/mupdf,fluks/mupdf-x11-bookmarks,poor-grad-student/mupdf,ccxvii/mupdf,knielsen/mupdf,sebras/mupdf