Bug 702728: Destroy mutexes after dropping base context.
Bug 702728: Destroy mutexes after dropping base context.

Previously the mutexes were destroyed before dropping the base
context. When reference counted objects, e.g. document handler
contexts, were dropped mupdf would call fz_drop_imp() which tried to
take the allocation lock. The allocation lock is one of the destroyed
mutexes causing an error or crash in pthreads.

Reversing the order such that the base context is dropped before
the mutexes are freed resolves this issue.

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