scripts/mupdfwrap.py: added optional runtime reference-count checking for wrapper classes.
scripts/mupdfwrap.py: added optional runtime reference-count checking for wrapper classes.

For MuPDF structs that have an 'int refs;' member, we can now check at runtime
that the number of instances of the wrapper class for a particular instance of
the underlying MuPDF struct, is not more than the underlying struct's .refs
value. This check is performed by constructors, destructors and all other
generated member functions, and acts as a test that the generated C++ wrapper
code is correct.

Checking is only enabled if environmental variable MUPDF_check_refs is "1".

This check would have detected the bug fixed by ff662b20dc95: "fixed bug in
generation of fz_link iterators."

Also added --test-python-gui option to run python gui test.

TamirEvan/mupdf,TamirEvan/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,TamirEvan/mupdf,TamirEvan/mupdf